Now that i've had a few minutes to test this on another platform, I
can confirm it wasnt a bug in Cython.

The wrapper builds and executes fine under ubuntu 9.04 64bit. So the
problem I was having was either a MinGW or Windows issue. Either way,
i'm not going to worry about it.

Cheers,

Chris

On Thu, May 28, 2009 at 10:50 PM, Chris Colbert<[email protected]> wrote:
> Just to clarify, I've never used keyword arguments with this function.
> Chris
>
> On Thu, May 28, 2009 at 10:46 PM, Chris Colbert <[email protected]> wrote:
>>
>> Robert,
>> That's correct. Of course I had to remove all the checks related to
>> Keyword args in the body of the function before it would execute. So
>> essentially, cleaning the code so that it only accepts positional arguments
>> fixes the crashing problem.
>> Chris
>>
>> On Thu, May 28, 2009 at 6:40 PM, Robert Bradshaw
>> <[email protected]> wrote:
>>>
>>> On May 28, 2009, at 9:16 AM, Chris Colbert wrote:
>>>
>>> > Alright, I "fixed" the problem by hacking the Cython generated C file.
>>> >
>>> > I removed everything in the IF clause that determined whether the
>>> > Python Arguments were keyword argument or not and left only the
>>> > PyTuple_GET_ITEM statements.
>>> >
>>> > I then changed the PyMethodDef line like so:
>>> >
>>> > old entry: {__Pyx_NAMESTR("cvResize"), (PyCFunction)
>>> > __pyx_pf_5cy_cv_cvResize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR
>>> > (0)},
>>> > new entry: {__Pyx_NAMESTR("cvResize"), (PyCFunction)
>>> > __pyx_pf_5cy_cv_cvResize, METH_VARARGS, __Pyx_DOCSTR(0)},
>>> >
>>> >
>>> > Removing METH_KEYWORDS was essential. Even though the extension
>>> > compiled when it was present, the program still crashed.
>>> >
>>> > Without it, it works fine for all integers 0,1,2,3.
>>>
>>> Very strange. So to make sure I understand correctly, it was crashing
>>> with METH_KEYWORDS even if you weren't using keyword arguments?
>>>
>>> - Robert
>>>
>>> _______________________________________________
>>> Cython-dev mailing list
>>> [email protected]
>>> http://codespeak.net/mailman/listinfo/cython-dev
>>
>
>
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to