Skip to content

Commit 4af13a3

Browse files
authored
Merge branch 'master' into implicit_assembly_load_opt
2 parents d09fc92 + 8629e1e commit 4af13a3

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ matrix:
1414
sources:
1515
- sourceline: deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main
1616
key_url: https://packages.microsoft.com/keys/microsoft.asc
17-
- sourceline: deb http://download.mono-project.com/repo/debian trusty/snapshots/5.2.0.224 main
17+
- sourceline: deb http://download.mono-project.com/repo/ubuntu trusty main
1818
key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA6A19B38D3D831EF
1919
packages:
2020
- mono-devel
@@ -79,7 +79,7 @@ env:
7979
addons:
8080
apt:
8181
sources:
82-
- sourceline: deb http://download.mono-project.com/repo/debian trusty/snapshots/5.2.0.224 main
82+
- sourceline: deb http://download.mono-project.com/repo/ubuntu trusty main
8383
key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA6A19B38D3D831EF
8484
packages:
8585
- mono-devel

AUTHORS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
- David Lechner ([@dlech](https://github.com/dlech))
2424
- Dmitriy Se ([@dmitriyse](https://github.com/dmitriyse))
2525
- He-chien Tsai ([@t3476](https://github.com/t3476))
26-
- Jeff Reback ([@jreback](https://github.com/jreback))
26+
-   Ivan Cronyn ([@cronan](https://github.com/cronan))
27+
-   Jeff Reback ([@jreback](https://github.com/jreback))
2728
- Joe Frayne ([@jfrayne](https://github.com/jfrayne))
2829
- John Burnett ([@johnburnett](https://github.com/johnburnett))
2930
- Luke Stratman ([@lstratman](https://github.com/lstratman))

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
2929
- Fixed conversion of 'float' and 'double' values (#486)
3030
- Fixed 'clrmethod' for python 2 (#492)
3131
- Fixed double calling of constructor when deriving from .NET class (#495)
32+
- Fixed `clr.GetClrType` when iterating over `System` members (#607)
3233

3334

3435
## [2.3.0][] - 2017-03-11

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ from System.Windows.Forms import Form
4444
a `using (Py.GIL()) {/* Your code here */}` block.
4545
- Import python modules using `dynamic mod = Py.Import("mod")`,
4646
then you can call functions as normal, eg `mod.func(args)`.
47-
- Use `mod.func(args, Py.kw("keywordargname", keywordargvalue))` or `mod.func(args, keywordargname=keywordargvalue)`
47+
- Use `mod.func(args, Py.kw("keywordargname", keywordargvalue))` or `mod.func(args, keywordargname: keywordargvalue)`
4848
to apply keyword arguments.
4949
- All python objects should be declared as `dynamic` type.
5050
- Mathematical operations involving python and literal/managed types must

src/runtime/managedtype.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Runtime.InteropServices;
33

44
namespace Python.Runtime
@@ -34,6 +34,10 @@ internal static ManagedType GetManagedObject(IntPtr ob)
3434
IntPtr op = tp == ob
3535
? Marshal.ReadIntPtr(tp, TypeOffset.magic())
3636
: Marshal.ReadIntPtr(ob, ObjectOffset.magic(ob));
37+
if (op == IntPtr.Zero)
38+
{
39+
return null;
40+
}
3741
var gc = (GCHandle)op;
3842
return (ManagedType)gc.Target;
3943
}

0 commit comments

Comments
 (0)