Skip to content

Commit d8accfe

Browse files
authored
Merge pull request #106 from rcmcdonald91/rcm-c-incref
Add missing Py_INCREF in module initialization
2 parents a36bc45 + c35e2c7 commit d8accfe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

extension/maxminddb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,7 @@ PyMODINIT_FUNC PyInit_extension(void) {
737737
if (PyType_Ready(&Metadata_Type)) {
738738
return NULL;
739739
}
740+
Py_INCREF(&Metadata_Type);
740741
PyModule_AddObject(m, "Metadata", (PyObject *)&Metadata_Type);
741742

742743
PyObject *error_mod = PyImport_ImportModule("maxminddb.errors");

0 commit comments

Comments
 (0)