[Cython] Exporting inline functions from a pyx.
jomaroceguedag at gmail.com
Thu May 28 20:33:30 CEST 2015
It was a mistake. I just wanted to export a function from the .pyx, and I
did not consider the fact that inline functions should be treated
differently (the standard procedure for me was just to add the declaration
in the .pxd, the inline thingy looked inoffensive =) ). The inconvenient
was that in my local machine, and the reviewers' everything worked ok, but
we started getting a lot of compilation errors in other platforms after my
pull request was merged.
On Thu, May 28, 2015 at 1:16 PM, Robert Bradshaw <robertwb at gmail.com> wrote:
> On Tue, May 26, 2015 at 7:17 PM, Jesus-Omar Ocegueda-Gonzalez
> <jomaroceguedag at gmail.com> wrote:
> > Dear Cython developers,
> > thanks for the awesome compiler!, we recently faced an issue exporting
> > inline functions defined in a .pyx. According to this:
> > http://docs.cython.org/src/tutorial/pxd_files.html
> > the full inline definition (not just the declaration) should be in the
> > However, if we put the definition in the .pyx and just its declaration
> > header in the .pxd,
> Yes, it sounds like there's a bug here, but is there a reason you're doing
> > Cython declares a pointer to the inline function
> > similar to:
> > static CYTHON_INLINE double (*__function_name)(...); /*proto*/
> > but this causes a compilation error in some platforms (but successfully
> > compiles in others) because variables cannot be declare as inline. You
> > find a log with the compilation errors here:
> > I guess it should be possible to detect when a function is inline and in
> > that case remove the CYTHON_INLINE from the pointer declaration, or at
> > consistently fail in all platforms. Is this a known issue?
> > Thank you very much!
> > With warm regards,
> > -Omar.
> > --
> > "Cada quien es dueño de lo que calla y esclavo de lo que dice"
> > -Proverbio chino.
> > "We all are owners of what we keep silent and slaves of what we say"
> > -Chinese proverb.
> > http://www.cimat.mx/~omar
> > _______________________________________________
> > cython-devel mailing list
> > cython-devel at python.org
> > https://mail.python.org/mailman/listinfo/cython-devel
> cython-devel mailing list
> cython-devel at python.org
"Cada quien es dueño de lo que calla y esclavo de lo que dice"
"We all are owners of what we keep silent and slaves of what we say"
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cython-devel