Sorry this is slightly offtopic, but I think it's important... According to recent experiments tracking down a memory leak, it seems that PyObject_CallFunction(func, "N", object) and PyObject_CallFunction(func, "O", object) are doing exactly the same thing. However, documentation says "The C arguments are described using a Py_BuildValue() style format string.". And of course Py_BuildValue consumes one object reference, according to the documentation and practice. However, PyObject_CallFunction does _not_ consume such an object reference, contrary to what I believed for years. God knows how many leaks I may have introduced in my bindings... :|
Any comments? _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com