Merged
Conversation
scoder
reviewed
May 23, 2020
Cython/Includes/numpy/__init__.pxd
Outdated
|
|
||
| cdef extern from "Python.h": | ||
| ctypedef int Py_intptr_t | ||
| bint PyObject_TypeCheck(object obj, PyTypeObject* type) |
Contributor
There was a problem hiding this comment.
There is a declaration for this in cpython.object, which can (and should) just be cimported instead to avoid the duplication here.
Contributor
Author
There was a problem hiding this comment.
will update. any thoughts on if this can/should be nogil? there was some discussion on this in the numpy thread
Contributor
There was a problem hiding this comment.
It's not documented as not requiring the GIL and Pandas apparently doesn't need it according to the discussion over there. We shouldn't take decisions for the CPython project on our side that they may regret at some point.
Contributor
Author
There was a problem hiding this comment.
Makes sense. If/when this goes through, ill make a follow-up PR in numpy to use the cimport for PyObject_TypeCheck
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
copy paste of the
__init__.pxdedits in numpy/numpy#16266