diff options
author | Georg Brandl <georg@python.org> | 2010-12-28 09:29:19 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-12-28 09:29:19 (GMT) |
commit | 15641925b81efec984a2844276edc5c07c2eebff (patch) | |
tree | a8417e04f58dc281353802cb8211965a0907773a /Doc/extending | |
parent | fcf3a0c55bc38943647d9145e214ca3b6f8b5577 (diff) | |
download | cpython-15641925b81efec984a2844276edc5c07c2eebff.zip cpython-15641925b81efec984a2844276edc5c07c2eebff.tar.gz cpython-15641925b81efec984a2844276edc5c07c2eebff.tar.bz2 |
Fix advice: call PyType_Ready to fill in ob_type of custom types.
Diffstat (limited to 'Doc/extending')
-rw-r--r-- | Doc/extending/windows.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/extending/windows.rst b/Doc/extending/windows.rst index 66912af..3fd5e57 100644 --- a/Doc/extending/windows.rst +++ b/Doc/extending/windows.rst @@ -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: |