Michael Hudson <mwh@python.net> writes: > /* There are three "families" of memory API: the "raw memory", "object > memory" and "object" families. (This is ignoring the matter of the > cycle collector, about which more is said below). Of course this is an over-simplification. There is at least one other family in fairly widespread use in the Python core; the "typed memory allocator", PyMem_New, PyMem_Resize and PyMem_Del. Should this family be listed in pyemcompat.h or subtly discouraged? (I don't think there are any other options). I think it should be subtly discouraged, for a couple of reasons: a) three is a smaller number than four. b) there is a non-analogy: PyMem_Malloc ---> PyMem_New PyObject_Malloc ---> PyObject_New They do rather different things. c) I don't think omitting a cast and a sizeof is that much of a win. I'm not proposing actually taking these interfaces away. (as a special bonus I won't even mention the fact that we have PyMem_Resize, PyObject_GC_Resize (only used in listobject.c) but not PyObject_Resize...) Cheers, M. -- If a train station is a place where a train stops, what's a workstation? -- unknown (to me, at least)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4