Reverted back the ( i ) parameters for python, applied the PyGILState_Ensure from Dick into his PyLOCK class

This commit is contained in:
Miguel Angel Ajo 2013-03-12 01:37:45 +01:00
parent 93a8e7b395
commit 742e1a7e44
3 changed files with 11 additions and 12 deletions

View File

@ -78,7 +78,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateHToolbar()
m_mainToolBar->AddTool( ID_MODEDIT_NEW_MODULE, wxEmptyString, KiBitmap( new_footprint_xpm ), m_mainToolBar->AddTool( ID_MODEDIT_NEW_MODULE, wxEmptyString, KiBitmap( new_footprint_xpm ),
_( "New module" ) ); _( "New module" ) );
#ifdef KICAD_SCRIPTING_WXPYTHON #ifdef KICAD_SCRIPTING
m_mainToolBar->AddTool( ID_MODEDIT_NEW_MODULE_FROM_WIZARD, wxEmptyString, m_mainToolBar->AddTool( ID_MODEDIT_NEW_MODULE_FROM_WIZARD, wxEmptyString,
KiBitmap( module_wizard_xpm ), KiBitmap( module_wizard_xpm ),
_( "New module from footprint wizard" ) ); _( "New module from footprint wizard" ) );

View File

@ -44,14 +44,13 @@ public:
#else #else
class PyLOCK class PyLOCK
{ {
PyGILState_STATE gil_state;
public: public:
// @todo: this is wrong, python docs clearly say we need the GIL, PyLOCK() { gil_state = PyGILState_Ensure(); }
// irrespective of wxPython. ~PyLOCK() { PyGILState_Release( gil_state ); }
PyLOCK() {}
~PyLOCK() {}
}; };
#endif #endif