| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
| int rc = PyModule_AddObjectRef(mod, "WITH_PYMALLOC", v); | ||
| Py_DECREF(v); | ||
| if (rc < 0) { | ||
| if (PyModule_AddObjectRef(mod, "WITH_PYMALLOC", v) < 0) { |
There was a problem hiding this comment.
Was this purposefully not converted to PyModule_Add()?
Sorry, something went wrong.
There was a problem hiding this comment.
Yes, PyModule_AddObjectRef() is more fitting here. But the old code was complicated without need.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
If PyModule_AddObjectRef() followed by Py_DECREF() of the added value, the code can be simplified by using PyModule_Add() which was designed specially for such cases.