mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
Formalize that the Py_VISIT macro requires that the tp_traverse
implementation it's used in must give its arguments specific names.
This commit is contained in:
parent
89ba1fff17
commit
eda29306b3
3 changed files with 49 additions and 39 deletions
|
@ -302,7 +302,11 @@ PyAPI_FUNC(void) PyObject_GC_Del(void *);
|
|||
( (type *) _PyObject_GC_NewVar((typeobj), (n)) )
|
||||
|
||||
|
||||
/* Utility macro to help write tp_traverse functions */
|
||||
/* Utility macro to help write tp_traverse functions.
|
||||
* To use this macro, the tp_traverse function must name its arguments
|
||||
* "visit" and "arg". This is intended to keep tp_traverse functions
|
||||
* looking as much alike as possible.
|
||||
*/
|
||||
#define Py_VISIT(op) \
|
||||
do { \
|
||||
if (op) { \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue