mirror of
https://github.com/python/cpython.git
synced 2025-11-13 07:26:31 +00:00
Fix advice: call PyType_Ready to fill in ob_type of custom types.
This commit is contained in:
parent
fcf3a0c55b
commit
15641925b8
1 changed files with 3 additions and 3 deletions
|
|
@ -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::
|
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:
|
.. _dynamic-linking:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue