PyAPI: use PyModule_AddType utility function

This commit is contained in:
2021-02-12 08:08:16 +11:00
parent d21f445469
commit aa43e2ec29
6 changed files with 37 additions and 55 deletions

View File

@@ -459,7 +459,7 @@ PyMODINIT_FUNC PyInit_mathutils_kdtree(void)
if (PyType_Ready(&PyKDTree_Type)) {
return NULL;
}
PyModule_AddObject(m, "KDTree", (PyObject *)&PyKDTree_Type);
PyModule_AddType(m, &PyKDTree_Type);
return m;
}