[Python-Dev] Re: Suggested memory API rules for 2.3

Michael Hudson mwh@python.net
03 Apr 2002 17:53:57 +0100


Neil Schemenauer <nas@python.ca> writes:

> Tim Peters wrote:
> >     Recommended Practice
> > 
> >     When backward compatibility is not a concern, using this subset of
> >     the raw memory and object memory APIs is recommended:
> > 
> >     PyMem_{Malloc, Realloc, Free}
> >     PyObject_{Malloc, Realloc, Free}
> >     PyObject_{New, NewVar}
> 
> This should probably come up front in the documentation.  All the rest
> is historical crap. :-)

We should probably provide an example of preprocessor hackery that
lets you use these interfaces and remain backward compatible as far as
possible.  Maybe even a little .h file which we can suggest extension
authors bundle with their extensions.

Cheers,
M.

-- 
  On the other hand, the following areas are subject to boycott
  in reaction to the rampant impurity of design or execution, as
  determined after a period of study, in no particular order:
    ...                              http://www.naggum.no/profile.html