Changes needed to be able to build with SWIG 1.3.24, 1.3.27 as well as
the upcoming 1.3.28, using #if statements on SWIG_VERSION. Adjustments to ownership of SWIG objects, add some destructors and explicitly disown non-window objects when their ownership is transfered to a C++ object. Since all window objects are owned by their parent, or by themselves, always set their thisown attribute to False. Explicitly set thisown to False after any Destroy() methods are called, so SWIG doesn't try to destroy them again. Etc. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -54,7 +54,7 @@ class wxLog
|
||||
{
|
||||
public:
|
||||
wxLog();
|
||||
|
||||
~wxLog();
|
||||
|
||||
// these functions allow to completely disable all log messages
|
||||
// is logging disabled now?
|
||||
@@ -80,9 +80,12 @@ public:
|
||||
// create one if none exists
|
||||
static wxLog *GetActiveTarget();
|
||||
|
||||
%disownarg( wxLog* pLogger );
|
||||
%newobject SetActiveTarget;
|
||||
// change log target, pLogger may be NULL
|
||||
static wxLog *SetActiveTarget(wxLog *pLogger);
|
||||
|
||||
%cleardisown( wxLog* pLogger );
|
||||
|
||||
// suspend the message flushing of the main target until the next call
|
||||
// to Resume() - this is mainly for internal use (to prevent wxYield()
|
||||
// from flashing the messages)
|
||||
@@ -149,6 +152,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
%pythonAppend Destroy "args[0].thisown = 0";
|
||||
%extend { void Destroy() { delete self; } }
|
||||
};
|
||||
|
||||
@@ -222,7 +226,7 @@ public:
|
||||
unsigned long wxSysErrorCode();
|
||||
const wxString wxSysErrorMsg(unsigned long nErrCode = 0);
|
||||
|
||||
%{// Make somce wrappers that double any % signs so they are 'escaped'
|
||||
%{// Make some wrappers that double any % signs so they are 'escaped'
|
||||
void wxPyLogFatalError(const wxString& msg)
|
||||
{
|
||||
wxString m(msg);
|
||||
|
Reference in New Issue
Block a user