Reverted back the ( i ) parameters for python, applied the PyGILState_Ensure from Dick into his PyLOCK class
This commit is contained in:
parent
93a8e7b395
commit
742e1a7e44
|
@ -78,7 +78,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateHToolbar()
|
|||
m_mainToolBar->AddTool( ID_MODEDIT_NEW_MODULE, wxEmptyString, KiBitmap( new_footprint_xpm ),
|
||||
_( "New module" ) );
|
||||
|
||||
#ifdef KICAD_SCRIPTING_WXPYTHON
|
||||
#ifdef KICAD_SCRIPTING
|
||||
m_mainToolBar->AddTool( ID_MODEDIT_NEW_MODULE_FROM_WIZARD, wxEmptyString,
|
||||
KiBitmap( module_wizard_xpm ),
|
||||
_( "New module from footprint wizard" ) );
|
||||
|
|
|
@ -44,14 +44,13 @@ public:
|
|||
|
||||
|
||||
#else
|
||||
|
||||
class PyLOCK
|
||||
{
|
||||
PyGILState_STATE gil_state;
|
||||
|
||||
public:
|
||||
// @todo: this is wrong, python docs clearly say we need the GIL,
|
||||
// irrespective of wxPython.
|
||||
PyLOCK() {}
|
||||
~PyLOCK() {}
|
||||
PyLOCK() { gil_state = PyGILState_Ensure(); }
|
||||
~PyLOCK() { PyGILState_Release( gil_state ); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue