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
Py_INCREF/DECREF available as macros only #40170
Comments
I have an application where I locate a python shared library, link to I would like Py_INCREF and Py_DECREF to be available as exported |
Logged In: YES Bob, I understand your desire and will support it. Would |
Logged In: YES Here's a patch.. Py_IncRef and Py_DecRef for Py_XINCREF and |
Logged In: YES Docs are missing ;-) |
Logged In: YES Where do those go? Does it *need* to be well documented right away? |
Logged In: YES IMO every function should be documented, or at least listed I'd suggest src/Doc/api/refcounting.tex, near Py_INCREF and While we're at it, did you miss Py_XDECREF by accident? |
Logged In: YES I'm not sure what you mean by "miss Py_XDECREF", but I did make a A new patch (which should actually compile, in theory) is attached, |
Logged In: YES And I wasn't reading your patch carefully, but now I The only suggestion I have now: I think the functions should |
Logged In: YES There's no need to provide the Py_X* versions, IMHO. It's easy |
Logged In: YES I don't see any reason to name them Py_X*. The X doesn't really mean This is for the very limited use case where you don't know or care how |
Logged In: YES The X does mean something - you *can* pass a NULL pointer. Whether we expose the Py_(INC|DEC)REF or the |
Logged In: YES I'd say, only provide versions that are equivalent to |
Logged In: YES I think that the X prefix only applies to macros. AFAIK there are no sjoerd clearly explains why I chose the X versions in his comment below. In short, I think it's a bad idea to functionify Py_(INC|DEC)REF, but I don't |
Logged In: YES Ok, I'll buy that. And the docs Bob has provided explain |
Logged In: YES Checked into CVS. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: