]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix advice: call PyType_Ready to fill in ob_type of custom types.
authorGeorg Brandl <georg@python.org>
Tue, 28 Dec 2010 09:29:19 +0000 (09:29 +0000)
committerGeorg Brandl <georg@python.org>
Tue, 28 Dec 2010 09:29:19 +0000 (09:29 +0000)
Doc/extending/windows.rst

index 66912af0db26804e5d970101962381a2d47087f2..3fd5e576de0e143cb4d206dedd95eeca36e4cd53 100644 (file)
@@ -110,7 +110,7 @@ described here are distributed with the Python sources in the
    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 @@ constant".  This shows up when building DLL under MSVC.  Change it to::
 
 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: