File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ public void TestCtorSByte()
8686 public void TestCtorPtr ( )
8787 {
8888 var i = new PyInt ( 5 ) ;
89+ Runtime . Runtime . XIncref ( i . Handle ) ;
8990 var a = new PyInt ( i . Handle ) ;
9091 Assert . AreEqual ( 5 , a . ToInt32 ( ) ) ;
9192 }
@@ -94,6 +95,7 @@ public void TestCtorPtr()
9495 public void TestCtorPyObject ( )
9596 {
9697 var i = new PyInt ( 5 ) ;
98+ Runtime . Runtime . XIncref ( i . Handle ) ;
9799 var a = new PyInt ( i ) ;
98100 Assert . AreEqual ( 5 , a . ToInt32 ( ) ) ;
99101 }
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ public void TestCtorDouble()
102102 public void TestCtorPtr ( )
103103 {
104104 var i = new PyLong ( 5 ) ;
105+ Runtime . Runtime . XIncref ( i . Handle ) ;
105106 var a = new PyLong ( i . Handle ) ;
106107 Assert . AreEqual ( 5 , a . ToInt32 ( ) ) ;
107108 }
@@ -110,6 +111,7 @@ public void TestCtorPtr()
110111 public void TestCtorPyObject ( )
111112 {
112113 var i = new PyLong ( 5 ) ;
114+ Runtime . Runtime . XIncref ( i . Handle ) ;
113115 var a = new PyLong ( i ) ;
114116 Assert . AreEqual ( 5 , a . ToInt32 ( ) ) ;
115117 }
You can’t perform that action at this time.
0 commit comments