[Python-checkins] CVS: python/dist/src/Modules xxsubtype.c,2.11,2.12
Tim Peters
tim_one@users.sourceforge.net
Mon, 17 Dec 2001 10:26:21 -0800
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv26040/python/Modules
Modified Files:
xxsubtype.c
Log Message:
initxxsubtype(): Add a comment to make the magic clearer; I doubt it's
obvious to anyone except PyType_Ready's author <0.9 wink>.
Index: xxsubtype.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/xxsubtype.c,v
retrieving revision 2.11
retrieving revision 2.12
diff -C2 -d -r2.11 -r2.12
*** xxsubtype.c 2001/12/17 17:25:53 2.11
--- xxsubtype.c 2001/12/17 18:26:19 2.12
***************
*** 241,246 ****
PyObject *m, *d;
! /* Fill in the deferred data addresses. This must be done before
! PyType_Ready() is called. */
spamdict_type.tp_base = &PyDict_Type;
if (PyType_Ready(&spamdict_type) < 0)
--- 241,248 ----
PyObject *m, *d;
! /* 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)