python: return error if PyObject obj is NULL for unwrapper helper functions
The result is indeterminate for NULL argument to python functions as follows. It's better to return negative value in these situations. PyObject_IsTrue will segfault if the argument is NULL PyFloat_AsDouble(NULL) is -1.000000 PyLong_AsUnsignedLongLong(NULL) is 0.000000 (cherry picked from commit 4c6be02a)
Showing
想要评论请 注册 或 登录