I just fixed a bug in the new memoryview that used PyObject_DEL which caused a problem in debug mode. I had to change it to a Py_DECREF. It seems we have a lot of spellings of ways to free an object and I wonder if there are more problems lurking in there.
$ cat */*.c | grep -c PyObject_Del 103 $ cat */*.c | grep -c PyObject_DEL 16 $ cat */*.c | grep -c PyObject_Free 16 $ cat */*.c | grep -c PyObject_FREE 19 I don't know how many of these are correct or incorrect. Note in Include/objimpl, the Del and Free variants are the same. I plan to get rid of one of them. #define PyObject_Del PyObject_Free #define PyObject_DEL PyObject_FREE PyObject_{MALLOC,REALLOC,FREE} depend upon whether python is compiled with debug mode, pymalloc, or not. What are the rules for when a particular API should be used (or not used) to free an object? n _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com