We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
# add_int.pyx cdef api add(int x, int y): cdef int r; r = x + y; return r
check:
>>> import add_int >>> add_int.__pyx_capi__['add'] <capsule object "PyObject *(int, int)" at 0x7f731cfdd540>
However if I use cythonize an external C code which does the same thing, it gives me a PyCapsule with proper signature. (see link below for the code)
>>> import cy_add_int >>> cy_add_int.__pyx_capi__['cy_add'] <capsule object "int (int, int)" at 0x7f7169dfba50>
I have uploaded the source files for the above cases with Makefiles if anybody wants to check. Just run make build.
make build
https://github.com/ashwinvis/cython_capi/tree/master/cython_issue
This is also related to serge-sans-paille/pythran/issues/743 where Pythran is adding the possibility to pass Cython functions as arguments through PyCapsules. cc:@serge-sans-paille
The text was updated successfully, but these errors were encountered:
The signature is correct. The return type is object in the first case. See, for example: http://docs.cython.org/en/latest/src/reference/language_basics.html#parameters
object
Sorry, something went wrong.
No branches or pull requests
What does not work
check:
What works
However if I use cythonize an external C code which does the same thing, it gives me a PyCapsule with proper signature. (see link below for the code)
I have uploaded the source files for the above cases with Makefiles if anybody wants to check. Just run
make build
.https://github.com/ashwinvis/cython_capi/tree/master/cython_issue
This is also related to serge-sans-paille/pythran/issues/743 where Pythran is adding the possibility to pass Cython functions as arguments through PyCapsules. cc:@serge-sans-paille
The text was updated successfully, but these errors were encountered: