File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,14 @@ const char *callWrapperError(int ret)
14
14
return errStrMap[ret].c_str ();
15
15
}
16
16
spdlog::error (" wrapper Error,ret:{}" , ret);
17
- // PyGILState_STATE gstate = PyGILState_Ensure();
17
+ std::cout<<" wrapper error" <<ret<<std::endl;
18
+ PyGILState_STATE gstate = PyGILState_Ensure ();
18
19
PyObject *wrapperModule = PyImport_ImportModule (_wrapperName);
19
20
PyObject *errFunc = PyObject_GetAttrString (wrapperModule, " wrapperError" );
20
21
if (!errFunc || !PyCallable_Check (errFunc))
21
22
{
22
23
std::cout << log_python_exception << std::endl;
23
- // PyGILState_Release(gstate);
24
+ PyGILState_Release (gstate);
24
25
return " wrapperError func need to implement" ;
25
26
}
26
27
PyObject *pArgsT = PyTuple_New (1 );
@@ -62,7 +63,7 @@ const char *callWrapperError(int ret)
62
63
Py_XDECREF (pArgsT);
63
64
Py_DECREF (errFunc);
64
65
Py_XDECREF (wrapperModule);
65
- // PyGILState_Release(gstate);
66
+ PyGILState_Release (gstate);
66
67
return errStrMap[ret].c_str ();
67
68
}
68
69
You can’t perform that action at this time.
0 commit comments