gcc-python-plugin
gcc-python-plugin copied to clipboard
False refleak warning with PyObject_CallMethod and "N" argument specificier
CPyChecker warns that "ob_refcnt of PyBool_FromLong is 1 too high" in code like this:
PyObject_CallMethod(obj, "methodname", "N", PyBool_FromLong(0));
In fact, the "N" specifier means that PyObject_CallMethod steals the reference if the return value of PyBool_FromLong is non-NULL.
Imported from trac issue 55. Created by emptysquare on 2014-01-29T15:58:04, last modified: 2014-01-29T15:58:04