Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC: Add a numpy-doc docstring to add_newdoc #13946

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

Merged
merged 3 commits into from
Jul 11, 2019

Conversation

eric-wieser
Copy link
Member

Whether or not we decide this is public API, @charris wanted to see a standard-style docstring, which I think is a pretty fair request.

@mattip
Copy link
Member

mattip commented Jul 9, 2019

Is it worth mentioning this breaks the assumption that all slots will be filled before PyTypeReady by assigning a newly allocated char * to tp_doc (issue gh-10167), and may loose the memory?

@eric-wieser
Copy link
Member Author

@mattip: Sure, that might be worth a mention. Want to add the note yourself, since I think you remember the details of that best (either as an extra commit in this PR or a follow-up)

C-API best-practices, by:

- modifying a `PyTypeObject` after calling `PyType_Ready`
- calling `Py_INCREF` on the str and losing the reference, so the str
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed the typo, and changed to PyType_Ready too

@mattip mattip merged commit ef12217 into numpy:master Jul 11, 2019
@eric-wieser eric-wieser deleted the add_newdoc_docs branch September 14, 2019 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants