| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -86,6 +86,7 @@ public void TestCtorSByte() | |||
| 86 | 86 | public void TestCtorPtr() | |
| 87 | 87 | { | |
| 88 | 88 | var i = new PyInt(5); | |
| 89 | + Runtime.Runtime.XIncref(i.Handle); | ||
| 89 | 90 | var a = new PyInt(i.Handle); | |
| 90 | 91 | Assert.AreEqual(5, a.ToInt32()); | |
| 91 | 92 | } | |
@@ -94,6 +95,7 @@ public void TestCtorPtr() | |||
| 94 | 95 | public void TestCtorPyObject() | |
| 95 | 96 | { | |
| 96 | 97 | var i = new PyInt(5); | |
| 98 | + Runtime.Runtime.XIncref(i.Handle); | ||
| 97 | 99 | var a = new PyInt(i); | |
| 98 | 100 | Assert.AreEqual(5, a.ToInt32()); | |
| 99 | 101 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -102,6 +102,7 @@ public void TestCtorDouble() | |||
| 102 | 102 | public void TestCtorPtr() | |
| 103 | 103 | { | |
| 104 | 104 | var i = new PyLong(5); | |
| 105 | + Runtime.Runtime.XIncref(i.Handle); | ||
| 105 | 106 | var a = new PyLong(i.Handle); | |
| 106 | 107 | Assert.AreEqual(5, a.ToInt32()); | |
| 107 | 108 | } | |
@@ -110,6 +111,7 @@ public void TestCtorPtr() | |||
| 110 | 111 | public void TestCtorPyObject() | |
| 111 | 112 | { | |
| 112 | 113 | var i = new PyLong(5); | |
| 114 | + Runtime.Runtime.XIncref(i.Handle); | ||
| 113 | 115 | var a = new PyLong(i); | |
| 114 | 116 | Assert.AreEqual(5, a.ToInt32()); | |
| 115 | 117 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments