Cleanup: use PyModule_AddObjectRef where appropriate
This commit is contained in:
@@ -33,20 +33,18 @@ int UnaryFunction0DVec2f_Init(PyObject *module)
|
||||
if (PyType_Ready(&UnaryFunction0DVec2f_Type) < 0) {
|
||||
return -1;
|
||||
}
|
||||
Py_INCREF(&UnaryFunction0DVec2f_Type);
|
||||
PyModule_AddObject(module, "UnaryFunction0DVec2f", (PyObject *)&UnaryFunction0DVec2f_Type);
|
||||
PyModule_AddObjectRef(module, "UnaryFunction0DVec2f", (PyObject *)&UnaryFunction0DVec2f_Type);
|
||||
|
||||
if (PyType_Ready(&Normal2DF0D_Type) < 0) {
|
||||
return -1;
|
||||
}
|
||||
Py_INCREF(&Normal2DF0D_Type);
|
||||
PyModule_AddObject(module, "Normal2DF0D", (PyObject *)&Normal2DF0D_Type);
|
||||
PyModule_AddObjectRef(module, "Normal2DF0D", (PyObject *)&Normal2DF0D_Type);
|
||||
|
||||
if (PyType_Ready(&VertexOrientation2DF0D_Type) < 0) {
|
||||
return -1;
|
||||
}
|
||||
Py_INCREF(&VertexOrientation2DF0D_Type);
|
||||
PyModule_AddObject(module, "VertexOrientation2DF0D", (PyObject *)&VertexOrientation2DF0D_Type);
|
||||
PyModule_AddObjectRef(
|
||||
module, "VertexOrientation2DF0D", (PyObject *)&VertexOrientation2DF0D_Type);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user