File tree Expand file tree Collapse file tree 2 files changed +2
-22
lines changed Expand file tree Collapse file tree 2 files changed +2
-22
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public static void LoadDefaultArgs()
25
25
{
26
26
using ( new PythonEngine ( ) )
27
27
{
28
- using ( var argv = new PyList ( new BorrowedReference ( Runtime . Runtime . PySys_GetObject ( "argv" ) ) ) )
28
+ using ( var argv = new PyList ( Runtime . Runtime . PySys_GetObject ( "argv" ) ) )
29
29
{
30
30
Assert . AreNotEqual ( 0 , argv . Length ( ) ) ;
31
31
}
@@ -38,7 +38,7 @@ public static void LoadSpecificArgs()
38
38
var args = new [ ] { "test1" , "test2" } ;
39
39
using ( new PythonEngine ( args ) )
40
40
{
41
- using ( var argv = new PyList ( new BorrowedReference ( Runtime . Runtime . PySys_GetObject ( "argv" ) ) ) )
41
+ using ( var argv = new PyList ( Runtime . Runtime . PySys_GetObject ( "argv" ) ) )
42
42
{
43
43
Assert . AreEqual ( args [ 0 ] , argv [ 0 ] . ToString ( ) ) ;
44
44
Assert . AreEqual ( args [ 1 ] , argv [ 1 ] . ToString ( ) ) ;
Original file line number Diff line number Diff line change @@ -85,26 +85,6 @@ public PyList(PyObject[] items)
85
85
}
86
86
}
87
87
88
- /// <summary>
89
- /// Constructor to make a PyList from a BorrowedReference.
90
- /// The list assumes ownership of the reference.
91
- /// </summary>
92
- /// <param name="r">The borrowed reference</param>
93
- internal PyList ( BorrowedReference r )
94
- {
95
- IntPtr addr = r . DangerousGetAddress ( ) ;
96
- if ( ! Runtime . PyList_Check ( addr ) )
97
- {
98
- throw new ArgumentException ( "object is not a list" ) ;
99
- }
100
-
101
- obj = addr ;
102
- // Take ownership.
103
- Runtime . XIncref ( addr ) ;
104
-
105
- }
106
-
107
-
108
88
/// <summary>
109
89
/// IsListType Method
110
90
/// </summary>
You can’t perform that action at this time.
0 commit comments