[Python-Dev] Suggested memory API rules for 2.3

Skip Montanaro skip@pobox.com
Wed, 3 Apr 2002 04:55:11 -0600


    Tim> Guido and I sat down and hashed this out Tuesday afternoon.  Here's
    Tim> what I think Revealed Truth was.  

Hallelujah!  Even I understood it.  I can't imagine adapting to this scheme
should be difficult.  The only thing that threw me a little was the alphabet
soup in 

    Use as Function Designators

    Programs shall not use use a name from line B, C, D, F, G or H
    in a C context requiring a function designator.  Names from lines
    A and E may be used in C contexts requiring a function designator.
    A function designator is a C expression having function type;
    C contexts requiring a function designator include as an actual
    argument to a function taking a function argument.

This just means that PyMem_{Malloc, Realloc, Free} and PyObject_{Malloc,
Realloc, Free} will be implemented as functions or simple macros that expand
to a single function call, and that the others can be all sorts of CPP
gobbledygook, right?

Skip