On Oct 28, 2009, at 7:21 PM, Lisandro Dalcin wrote:

> On Wed, Oct 28, 2009 at 10:19 PM, Mark Lodato <[email protected]>  
> wrote:
>> On Wed, Oct 28, 2009 at 11:26 AM, Stefan Behnel  
>> <[email protected]> wrote:
>>> Robert Bradshaw, 28.10.2009 10:45:
>>>>
>>>> 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.
>>>
>>> [snip]
>>>
>>> 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.
>>
>> I copied this almost verbatim from Python 3.1.1's Modules/ 
>> python.c.  I
>> assume using PyMem is fine since CPython does it, but I default to
>> your judgment...
>>
>
> IMHO, then changes to Modules/python.c in Python 3 are a mess...

Yeah, I agree, they're pretty ugly.

> Perhaps I'm missing somenthing, but I fail to the point of using
> PyMem_XXX there... I'm not going to reject your implementation for
> using the PyMem_XXX functions, but I would prefer plain
> malloc()/free() being used.. I do this in mpi4py, tough this
> re-rubuilt interpreter is not usually required:
> http://code.google.com/p/mpi4py/source/browse/trunk/src/python.c
>

I've just changed them to plain old free/malloc.

- Robert

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to