We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e6a395c commit 9c7456dCopy full SHA for 9c7456d
c++/cpp2py/py_converter.hpp
@@ -54,7 +54,8 @@ namespace cpp2py {
54
// Fetch the pointer to the converter table from __main__
55
inline std::shared_ptr<conv_table_t> get_conv_table_from_main() {
56
// Fetch __main__ module
57
- pyref mod = PyImport_GetModule(PyUnicode_FromString("__main__"));
+ pyref str_main = PyUnicode_FromString("__main__");
58
+ pyref mod = PyImport_GetModule(str_main);
59
if (mod == NULL) {
60
PyErr_SetString(PyExc_RuntimeError, "Severe internal error : can not load __main__");
61
throw std::runtime_error("Severe internal error : can not load __main__");
0 commit comments