diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-12-17 18:26:19 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-12-17 18:26:19 (GMT) |
commit | 4befff95e91f649b10b6c763753cd44599fb56af (patch) | |
tree | b850ffce86df0578202e048bfa80a8886b2310dc /Modules | |
parent | a7b9b3ccba6f48a11cb2ee8f55d53696ed7b4697 (diff) | |
download | cpython-4befff95e91f649b10b6c763753cd44599fb56af.zip cpython-4befff95e91f649b10b6c763753cd44599fb56af.tar.gz cpython-4befff95e91f649b10b6c763753cd44599fb56af.tar.bz2 |
initxxsubtype(): Add a comment to make the magic clearer; I doubt it's
obvious to anyone except PyType_Ready's author <0.9 wink>.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/xxsubtype.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/xxsubtype.c b/Modules/xxsubtype.c index d108409..f3d8e89 100644 --- a/Modules/xxsubtype.c +++ b/Modules/xxsubtype.c @@ -240,8 +240,10 @@ initxxsubtype(void) { PyObject *m, *d; - /* Fill in the deferred data addresses. This must be done before - PyType_Ready() is called. */ + /* Fill in deferred data addresses. This must be done before + PyType_Ready() is called. Note that PyType_Ready() automatically + initializes the ob.ob_type field to &PyType_Type if it's NULL, + so it's not necessary to fill in ob_type first. */ spamdict_type.tp_base = &PyDict_Type; if (PyType_Ready(&spamdict_type) < 0) return; |