Allow passing None for nullable args · pythonnet/pythonnet@f92feea · GitHub
Skip to content

Commit f92feea

Browse files
author
dhirschf
committed
Allow passing None for nullable args
1 parent 67650a2 commit f92feea

3 files changed

Lines changed: 23 additions & 0 deletions

File tree

src/runtime/converter.cs

Lines changed: 11 additions & 0 deletions

src/testing/conversiontest.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,14 @@ public ConversionTest()
3232

3333
public byte[] ByteArrayField;
3434
public sbyte[] SByteArrayField;
35+
36+
public T? Echo<T>(T? arg) where T: struct {
37+
return arg;
38+
}
39+
3540
}
3641

42+
3743

3844
public interface ISpam
3945
{

src/tests/test_conversion.py

Lines changed: 6 additions & 0 deletions

0 commit comments

Comments
 (0)