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 c660631 commit 739d3ecCopy full SHA for 739d3ec
python/_jsonnet.c
@@ -667,7 +667,9 @@ PyMODINIT_FUNC PyInit__jsonnet(void)
667
{
668
PyObject *module = PyModule_Create(&_module);
669
PyObject *version_str = PyUnicode_FromString(LIB_JSONNET_VERSION);
670
- PyModule_AddObjectRef(module, "version", version_str);
+ if (PyModule_AddObject(module, "version", PyUnicode_FromString(LIB_JSONNET_VERSION)) < 0) {
671
+ Py_XDECREF(version_str);
672
+ }
673
return module;
674
}
675
#else
0 commit comments