On Mon, Jun 29, 2009 at 3:59 PM, Chris Colbert<[email protected]> wrote: > > The wrapper builds and executes fine under ubuntu 9.04 64bit. So the > problem I was having was either a MinGW or Windows issue. >
Really strange... The Cython testsuite and my own projects do work just fine with MinGW (and yes, I do test for kw args)... > Either way, > i'm not going to worry about it. > Just to be sure... if you look at all the OpenCV headers, can you see "__stdcall" somewhere? > 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 > -- Lisandro Dalcín --------------- Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) PTLC - Güemes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594 _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
