Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1564192

Browse files
committed
Fix advice: call PyType_Ready to fill in ob_type of custom types.
1 parent fcf3a0c commit 1564192

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Doc/extending/windows.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ described here are distributed with the Python sources in the
110110
Now your options are:
111111

112112
#. Copy :file:`example.sln` and :file:`example.vcproj`, rename them to
113-
:file:`spam.\*`, and edit them by hand, or
113+
:file:`spam.\*`, and edit them by hand, or
114114

115115
#. Create a brand new project; instructions are below.
116116

@@ -179,8 +179,8 @@ constant". This shows up when building DLL under MSVC. Change it to::
179179

180180
and add the following to the module initialization function::
181181

182-
MyObject_Type.ob_type = &PyType_Type;
183-
182+
if (PyType_Ready(&MyObject_Type) < 0)
183+
return NULL;
184184

185185

186186
.. _dynamic-linking:

0 commit comments

Comments
 (0)