That would do it :). This is why we need automatic .h -> .pxd
declarations. Also, it's been thrown around a couple of times that it
may be worth making "cdef foo()" a warning, forcing the user to
explicitly declare "cdef object foo()" (or, in your case, "cdef int
foo() :-).
On Mon, Mar 7, 2011 at
On Fri, Feb 25, 2011 at 8:07 AM, Jason Grout
wrote:
> On 2/24/11 11:35 PM, Robert Bradshaw wrote:
>>
>> On Thu, Feb 24, 2011 at 8:52 PM, Robert Miller
>> wrote:
>>>
>>> I'm working on wrapping a C package in Cython for use in Sage, and I'm
>>> having some trouble. I think the problem has to do wi
On Fri, Feb 25, 2011 at 1:07 AM, Tom Boothby wrote:
> FWIW, I get that error message on the following:
>
> sage: cython("""
> cdef int foo(int z) except -1:
> return z
>
> def bar(z):
> return foo(z)
> """)
> sage: bar(-1)
> ---
FWIW, I get that error message on the following:
sage: cython("""
cdef int foo(int z) except -1:
return z
def bar(z):
return foo(z)
""")
sage: bar(-1)
---
SystemError Traceback (most rece