[Python-Dev] When tp_clear returns non-zero? (original) (raw)
Serhiy Storchaka storchaka at gmail.com
Mon May 28 08:17:45 EDT 2018
- Previous message (by thread): [Python-Dev] Troubles to merge changes in the 2.7 branch: PR "out-of-date" branch
- Next message (by thread): [Python-Dev] When tp_clear returns non-zero?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
The tp_clear field of PyTypeObject has type inquiry. It is a pointer to a function that takes PyObject * and return int.
typedef int (*inquiry)(PyObject *);
I'm interesting what the result of this function means. In what cases it can return non-zero, and can it set an exception?
Currently tp_clear() is called in a single place, and its result is ignored. All tp_clear implementations in the stdlib always return 0.
- Previous message (by thread): [Python-Dev] Troubles to merge changes in the 2.7 branch: PR "out-of-date" branch
- Next message (by thread): [Python-Dev] When tp_clear returns non-zero?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]