projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c6e0ec
)
Demonstrate use of PyType_Ready() in the example.
author
Raymond Hettinger
<python@rcn.com>
Sun, 29 Dec 2002 17:16:49 +0000
(17:16 +0000)
committer
Raymond Hettinger
<python@rcn.com>
Sun, 29 Dec 2002 17:16:49 +0000
(17:16 +0000)
Modules/xxmodule.c
patch
|
blob
|
history
diff --git
a/Modules/xxmodule.c
b/Modules/xxmodule.c
index 4b8822cfc5b20b6f6e3927949661ab524d8f8016..501de86f68c4792f76b62611e7e5d3558e100d3e 100644
(file)
--- a/
Modules/xxmodule.c
+++ b/
Modules/xxmodule.c
@@
-235,9
+235,11
@@
initxx(void)
{
PyObject *m;
- /* Initialize the type of the new type object here; doing it here
- * is required for portability to Windows without requiring C++. */
- Xxo_Type.ob_type = &PyType_Type;
+ /* Finalize the type object including setting type of the new type
+ * object; doing it here is required for portability to Windows
+ * without requiring C++. */
+ if (PyType_Ready(&Xxo_Type) < 0)
+ return;
/* Create the module and add the functions */
m = Py_InitModule3("xx", xx_methods, module_doc);