[Python-checkins] r87524 - python/branches/py3k/Doc/extending/windows.rst
georg.brandl
python-checkins at python.org
Tue Dec 28 10:29:20 CET 2010
Author: georg.brandl
Date: Tue Dec 28 10:29:19 2010
New Revision: 87524
Log:
Fix advice: call PyType_Ready to fill in ob_type of custom types.
Modified:
python/branches/py3k/Doc/extending/windows.rst
Modified: python/branches/py3k/Doc/extending/windows.rst
==============================================================================
--- python/branches/py3k/Doc/extending/windows.rst (original)
+++ python/branches/py3k/Doc/extending/windows.rst Tue Dec 28 10:29:19 2010
@@ -110,7 +110,7 @@
Now your options are:
#. Copy :file:`example.sln` and :file:`example.vcproj`, rename them to
- :file:`spam.\*`, and edit them by hand, or
+ :file:`spam.\*`, and edit them by hand, or
#. Create a brand new project; instructions are below.
@@ -179,8 +179,8 @@
and add the following to the module initialization function::
- MyObject_Type.ob_type = &PyType_Type;
-
+ if (PyType_Ready(&MyObject_Type) < 0)
+ return NULL;
.. _dynamic-linking:
More information about the Python-checkins
mailing list