Spiro Python interface using Cython

33 views
Skip to first unread message

Shriramana Sharma

unread,
May 18, 2013, 2:37:40 AM5/18/13
to cython...@googlegroups.com
Spiro is an algorithm for producing smooth splines given a set of
on-curve control points. I am working on polishing the library. I
wrote a Python interface using Cython (thanks to all those who develop
it!).

The Spiro library uses callbacks, hence my recent in doing that in
Cython. I am happy to say I have been successful. The attached code
demonstrates it to whoever can spend the time to read it. The code is
under the GPLv3+. (Note: you don't need to worry about the internals
of spiro.c -- just look at spiro.h and bezctx.h to understand the
library being wrapped.)

I have one question: Clang generates the warning:

spiro_cy.c:653:1: warning: declaration does not declare anything
[-Wmissing-declarations]
spiro_cp;
^~~~~~~~
1 warning generated.

Why is this and what should I do to fix it? Thanks.

--
Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा
spiro-cython.tar.gz

Robert Bradshaw

unread,
May 19, 2013, 3:12:50 AM5/19/13
to cython...@googlegroups.com
I think this is due to
https://github.com/cython/cython/blob/3eea6fff8d3c9272aa49cb7a5d75e82ac74706af/Cython/Compiler/PyrexTypes.py#L2934
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "cython-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cython-users...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Shriramana Sharma

unread,
May 19, 2013, 3:44:48 AM5/19/13
to cython...@googlegroups.com
On Sun, May 19, 2013 at 12:42 PM, Robert Bradshaw <robe...@gmail.com> wrote:
> I think this is due to
> https://github.com/cython/cython/blob/3eea6fff8d3c9272aa49cb7a5d75e82ac74706af/Cython/Compiler/PyrexTypes.py#L2934

Hm. 'Twould seem that the code writer *might* be a little more
intelligent to detect when exactly it should forward-declare something
and when not, but this is a minor warning, and you *have* marked it as
a hack, so I guess I need not bother myself about it. (After all, it
isn't something *I* did in my code but the way Cython produces C
code.)
Reply all
Reply to author
Forward
0 new messages