/// Extrusion kind
inline static const std::string& ID()
{
- static const std::string MY_EXTRUSION_ID("Parameter");
- return MY_EXTRUSION_ID;
+ static const std::string MY_PARAMETER_ID("Parameter");
+ return MY_PARAMETER_ID;
}
/// attribute name of references sketch entities list, it should contain a sketch result or
/// a pair a sketch result to sketch face
}
_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();
+}
std::string errorMessage();
// Overrides PyInterp_Interp
virtual bool initContext();
+ virtual void closeContext();
};
#endif /* PARAMETERSPLUGIN_PYINTERP_H_ */