Cleanup: use PyModule_AddObjectRef where appropriate
This commit is contained in:
@@ -34,20 +34,17 @@ int UnaryFunction1DVec2f_Init(PyObject *module)
|
||||
if (PyType_Ready(&UnaryFunction1DVec2f_Type) < 0) {
|
||||
return -1;
|
||||
}
|
||||
Py_INCREF(&UnaryFunction1DVec2f_Type);
|
||||
PyModule_AddObject(module, "UnaryFunction1DVec2f", (PyObject *)&UnaryFunction1DVec2f_Type);
|
||||
PyModule_AddObjectRef(module, "UnaryFunction1DVec2f", (PyObject *)&UnaryFunction1DVec2f_Type);
|
||||
|
||||
if (PyType_Ready(&Normal2DF1D_Type) < 0) {
|
||||
return -1;
|
||||
}
|
||||
Py_INCREF(&Normal2DF1D_Type);
|
||||
PyModule_AddObject(module, "Normal2DF1D", (PyObject *)&Normal2DF1D_Type);
|
||||
PyModule_AddObjectRef(module, "Normal2DF1D", (PyObject *)&Normal2DF1D_Type);
|
||||
|
||||
if (PyType_Ready(&Orientation2DF1D_Type) < 0) {
|
||||
return -1;
|
||||
}
|
||||
Py_INCREF(&Orientation2DF1D_Type);
|
||||
PyModule_AddObject(module, "Orientation2DF1D", (PyObject *)&Orientation2DF1D_Type);
|
||||
PyModule_AddObjectRef(module, "Orientation2DF1D", (PyObject *)&Orientation2DF1D_Type);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user