Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2e063c2

Browse files
committed
remove private method _GetVariable
1 parent 5484451 commit 2e063c2

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

src/runtime/pyscope.cs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -270,28 +270,7 @@ public bool ContainsVariable(string name)
270270
return Runtime.PyMapping_HasKey(variables, pyKey.obj) != 0;
271271
}
272272
}
273-
274-
private PyObject _GetVariable(string name)
275-
{
276-
using (var pyKey = new PyString(name))
277-
{
278-
IntPtr op;
279-
if (Runtime.PyMapping_HasKey(variables, pyKey.obj) != 0)
280-
{
281-
op = Runtime.PyObject_GetItem(variables, pyKey.obj);
282-
}
283-
else
284-
{
285-
return null;
286-
}
287-
if (op == IntPtr.Zero)
288-
{
289-
throw new PythonException();
290-
}
291-
return new PyObject(op);
292-
}
293-
}
294-
273+
295274
/// <summary>
296275
/// GetVariable Method
297276
/// </summary>

0 commit comments

Comments
 (0)