Developer Ikarus_ 2450 Posted July 6, 2019 Developer Share Posted July 6, 2019 I noticed that every my client have the same bug, maybe sharing the fix prevents me from having to apply it to everyone and it also helps others who try the function and have problems. an example of buggy usage:File: scriptLib\PythonUtils.cpp bool PyTuple_GetUnsignedLong(PyObject* poArgs, int pos, unsigned long* ret) { if (pos >= PyTuple_Size(poArgs)) return false; PyObject * poItem = PyTuple_GetItem(poArgs, pos); if (!poItem) return false; *ret = PyLong_AsUnsignedLong(poItem); return true; } the problem seems to be PyLong_AsUnsignedLongLong which is buggy: #define PyLong_AsUnsignedLong PyLong_AsUnsignedLongLong how we could fix it? //replacing #define PyLong_AsUnsignedLong (unsigned long)PyLong_AsLongLong 10 My youtube channel on which you can see my works here Link to comment Share on other sites More sharing options...
Developer Ikarus_ 2450 Posted July 13, 2019 Author Developer Share Posted July 13, 2019 topic updated with the right fix, my bad My youtube channel on which you can see my works here Link to comment Share on other sites More sharing options...
Active Member ReFresh 2360 Posted July 13, 2019 Active Member Share Posted July 13, 2019 @Ikarus_ Where can be found this function: bool PyTuple_GetUnsignedLong? Can't find it in my src. I'll be always helpful! Link to comment Share on other sites More sharing options...
Developer Ikarus_ 2450 Posted July 13, 2019 Author Developer Share Posted July 13, 2019 scriptLib\PythonUtils.cpp 2 My youtube channel on which you can see my works here Link to comment Share on other sites More sharing options...
Recommended Posts