Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove private method _GetVariable
  • Loading branch information
yagweb committed Apr 7, 2017
commit 2e063c2f4be8be09b41e7fecf1b80e799a5603ad
23 changes: 1 addition & 22 deletions src/runtime/pyscope.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,28 +270,7 @@ public bool ContainsVariable(string name)
return Runtime.PyMapping_HasKey(variables, pyKey.obj) != 0;
}
}

private PyObject _GetVariable(string name)
{
using (var pyKey = new PyString(name))
{
IntPtr op;
if (Runtime.PyMapping_HasKey(variables, pyKey.obj) != 0)
{
op = Runtime.PyObject_GetItem(variables, pyKey.obj);
}
else
{
return null;
}
if (op == IntPtr.Zero)
{
throw new PythonException();
}
return new PyObject(op);
}
}


/// <summary>
/// GetVariable Method
/// </summary>
Expand Down