Stefan Behnel wrote: > Robert Bradshaw, 28.10.2009 10:45: > >> On Oct 28, 2009, at 12:21 AM, Stefan Behnel wrote: >> >>> Mark Lodato, 24.10.2009 17:49: >>> >>>> On Sat, Oct 24, 2009 at 1:47 AM, Stefan Behnel wrote: >>>> >>>>> There's also #434 about --embed not working in Py3. Mark, did you >>>>> test your >>>>> patch under Py3.1? >>>>> >>>> I saw that bug, and cython_freeze has the exact same problems as >>>> --embed. I'm working on a fix now. >>>> >>> ... any news from this front? >>> >> Yes, see >> >> http://trac.cython.org/cython_trac/ticket/439 >> > > Mark, thanks a lot for doing that. I hope you copied the wchar_t adaptation > part from somewhere, looks like a lot of work otherwise. > > One thing that strikes me, however, is the amount of code duplication. I > think we should put cython_freeze into the Cython package (e.g. as > Cython/Compiler/MainFunction.py), so that the compiler can use it to > generate a main() function, and just add a __main__ execution body at the > end that runs from the command line. Distutils could still install the > module as a "cython_freeze" script in /usr/bin then, and the shipped > bin/cython_freeze would simply import and run > Cython/Compiler/MainFunction.py (so that you don't need to install Cython > to get a runnable script). > > Another thing I noticed is the use of PyMem_Malloc() and friends. I'm not > sure if it's safe to use those before initialising the Python interpreter. > Anyway, I think that plain malloc() and free() make more sense here. > They require the GIL, last time I looked, so should probably be avoided.
Dag Sverre _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
