Kaydet (Commit) 3c736f1a authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Demonstrate use of PyType_Ready() in the example.

üst 8c6e0ec1
......@@ -235,9 +235,11 @@ initxx(void)
{
PyObject *m;
/* Initialize the type of the new type object here; doing it here
* is required for portability to Windows without requiring C++. */
Xxo_Type.ob_type = &PyType_Type;
/* Finalize the type object including setting type of the new type
* object; doing it here is required for portability to Windows
* without requiring C++. */
if (PyType_Ready(&Xxo_Type) < 0)
return;
/* Create the module and add the functions */
m = Py_InitModule3("xx", xx_methods, module_doc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment