Proposal: extern implementations of functions
Hello Cython developers, I would like to propose a new mechanism to implement functions in an external .c file. The goal is to solve the problem I was having in https://groups.google.com/forum/#!topic/cython-users/TsbBNyvwZn4 With the attached patch, you can do the following: * in foo.pxd, declare the function as usual: cdef void myfunc() * in foo.c, actually implement the function: static void myfunc() { /* ... */ } * in foo.pyx, declare the function extern: cdef extern from "foo.c": void myfunc() With my patch, the extern declaration in foo.pyx will be interpreted as implementing the function. Therefore, myfunc() is now available in the module foo, and it can also be cimported by other modules. What do you think of this proposed feature? Jeroen.
participants (1)
-
Jeroen Demeyer