[Python-Dev] Problem with the memory docs
Fri, 05 Apr 2002 01:45:09 -0500
>> Sorry, but this is nuts, and Martin is right that I don't want Python
>> to offer a "malloc wrapper" that doesn't meet the standard rules
>> for malloc. Instead I intend to change the docs to say that Py_Malloc(0)
>> acts like platform malloc(1), and leave it at that.
> That, OTOH, is not what Guido wants it to be. Guido wants Py_Malloc to
> return 0 *only* in case of failure; allocating 0 bytes should
> "normally" succeed. I still cannot see what problems you have with
> this requirement.
I'm not following this at all. Calling malloc(1) does exactly what Guido
wants. "malloc(1)" isn't a broken Unix manpage reference, if that's how
you're reading it; it means call malloc with an argument of 1.