use PyInt for vars not PyLong
This commit is contained in:
parent
1b59ea5989
commit
bd39de609b
1 changed files with 2 additions and 2 deletions
|
@ -60,9 +60,9 @@ bool python_exec(const std::string &path)
|
|||
bool python_get_long(const char *name, long *value)
|
||||
{
|
||||
PyObject *val = PyDict_GetItemString(obdict, const_cast<char*>(name));
|
||||
if (!(val && PyLong_Check(val))) return false;
|
||||
if (!(val && PyInt_Check(val))) return false;
|
||||
|
||||
*value = PyLong_AsLong(val);
|
||||
*value = PyInt_AsLong(val);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue