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

Reply via email to