Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/py-maxminddb: fix C extension initialization refcounting and unwi…
…nding
- Loading branch information
1 parent
a9a3acd
commit a21364e
Showing
2 changed files
with
14 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- extension/maxminddb.c.orig 2023-01-09 13:42:35 UTC | ||
+++ extension/maxminddb.c | ||
@@ -737,6 +737,7 @@ PyMODINIT_FUNC PyInit_extension(void) { | ||
if (PyType_Ready(&Metadata_Type)) { | ||
return NULL; | ||
} | ||
+ Py_INCREF(&Metadata_Type); | ||
PyModule_AddObject(m, "Metadata", (PyObject *)&Metadata_Type); | ||
|
||
PyObject *error_mod = PyImport_ImportModule("maxminddb.errors"); |