We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c6a8f0 commit 6997c2bCopy full SHA for 6997c2b
py2bit.c
@@ -290,8 +290,10 @@ PyMODINIT_FUNC PyInit_py2bit(void) {
290
#else
291
//Python2 initialization
292
PyMODINIT_FUNC initpy2bit(void) {
293
+ PyObject *res;
294
if(PyType_Ready(&pyTwoBit) < 0) return;
- Py_InitModule3("py2bit", tbMethods, "A module for handling 2bit files");
295
+ res = Py_InitModule3("py2bit", tbMethods, "A module for handling 2bit files");
296
+ Py_INCREF(&pyTwoBit);
297
PyModule_AddObject(res, "py2bit", (PyObject *) &pyTwoBit);
298
PyModule_AddStringConstant(res, "__version__", pyTwoBitVersion);
299
}
0 commit comments