}
}
+void ParametersPlugin_PyInterp::clearLocalContext()
+{
+ PyLockWrapper lck;
+ PyDict_Clear(_local_context);
+}
+
double ParametersPlugin_PyInterp::evaluate(const std::string& theExpression, std::string& theError)
{
}
_global_context = PyModule_GetDict(m); // get interpreter global variable context
Py_INCREF(_global_context);
- _local_context = _global_context;
+ _local_context = PyDict_New();
+ Py_INCREF(_local_context);
return PyRun_SimpleString("from math import *") == 0;
}
+
+void ParametersPlugin_PyInterp::closeContext()
+{
+ Py_XDECREF(_local_context);
+ PyInterp_Interp::closeContext();
+}