-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decrement reference count #7003
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason you sometimes used Py_DECREF
instead of Py_XDECREF
?
It looks to me like it might be just for PyUnicode_FromString
, but I don't see anything special about that function.
Just for the times when we know that the value isn't null. Looking at the documentation, I had concluded that |
I am pretty sure that is an omission in the documentation: I'd expect every function that can allocate memory to possibly fail and return |
Ok, I've pushed an update. |
@nulano How does this look now? |
I've got one suggestion - I'm working on a PR to open in @radarhere's repo. Edit: see radarhere#19 |
Just to be clear, part of @nulano's suggestion is to remove >>> from PIL import _imagingmorph
>>> _imagingmorph.__version
'0.1' It's an unused part of the C API, so no objections. |
Resolves #6323