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 < rober...@math.washington.edu> 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 > Cython-dev@codespeak.net > http://codespeak.net/mailman/listinfo/cython-dev >
_______________________________________________ Cython-dev mailing list Cython-dev@codespeak.net http://codespeak.net/mailman/listinfo/cython-dev