Commit 742e1a7e authored by Miguel Angel Ajo's avatar Miguel Angel Ajo
Browse files

Reverted back the ( i ) parameters for python, applied the PyGILState_Ensure...

Reverted back the ( i ) parameters for python, applied the PyGILState_Ensure from Dick into his PyLOCK class
parent 93a8e7b3
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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" ) );
+4 −5
Original line number Original line Diff line number Diff line
@@ -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
+6 −6

File changed.

Contains only whitespace changes.