Fixed a few little bugs in how some methods are wrapped

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-04-01 20:34:02 +00:00
parent 0e9b78ce36
commit d6eacb2570
5 changed files with 45 additions and 39 deletions

View File

@@ -608,7 +608,7 @@ public:
static void Suspend(); static void Suspend();
static void Resume(); static void Resume();
void SetVerbose(bool bVerbose = TRUE); static void SetVerbose(bool bVerbose = TRUE);
static void DontCreateOnDemand(); static void DontCreateOnDemand();
static void SetTraceMask(wxTraceMask ulMask); static void SetTraceMask(wxTraceMask ulMask);
@@ -632,6 +632,7 @@ public:
return msg; return msg;
} }
} }
}; };
@@ -806,11 +807,21 @@ public:
}; };
enum { enum
wxEXEC_ASYNC = 0, // execute the process asynchronously {
wxEXEC_SYNC = 1, // synchronously // execute the process asynchronously
wxEXEC_NOHIDE = 2 // under Windows, don't hide the child even if it's wxEXEC_ASYNC = 0,
// IO is redirected (this is done by default)
// execute it synchronously, i.e. wait until it finishes
wxEXEC_SYNC = 1,
// under Windows, don't hide the child even if it's IO is redirected (this
// is done by default)
wxEXEC_NOHIDE = 2,
// under Unix, if the process is the group leader then killing -pid kills
// all children as well as pid
wxEXEC_MAKE_GROUP_LEADER = 4
}; };

View File

@@ -4936,29 +4936,19 @@ static PyObject *_wrap_wxLog_Resume(PyObject *self, PyObject *args, PyObject *kw
return _resultobj; return _resultobj;
} }
#define wxLog_SetVerbose(_swigobj,_swigarg0) (_swigobj->SetVerbose(_swigarg0))
static PyObject *_wrap_wxLog_SetVerbose(PyObject *self, PyObject *args, PyObject *kwargs) { static PyObject *_wrap_wxLog_SetVerbose(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj; PyObject * _resultobj;
wxLog * _arg0; bool _arg0 = (bool ) TRUE;
bool _arg1 = (bool ) TRUE; int tempbool0 = (int) TRUE;
PyObject * _argo0 = 0; char *_kwnames[] = { "bVerbose", NULL };
int tempbool1 = (int) TRUE;
char *_kwnames[] = { "self","bVerbose", NULL };
self = self; self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxLog_SetVerbose",_kwnames,&_argo0,&tempbool1)) if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:wxLog_SetVerbose",_kwnames,&tempbool0))
return NULL; return NULL;
if (_argo0) { _arg0 = (bool ) tempbool0;
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLog_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLog_SetVerbose. Expected _wxLog_p.");
return NULL;
}
}
_arg1 = (bool ) tempbool1;
{ {
PyThreadState* __tstate = wxPyBeginAllowThreads(); PyThreadState* __tstate = wxPyBeginAllowThreads();
wxLog_SetVerbose(_arg0,_arg1); wxLog::SetVerbose(_arg0);
wxPyEndAllowThreads(__tstate); wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL; if (PyErr_Occurred()) return NULL;
@@ -10561,6 +10551,7 @@ SWIGEXPORT(void) initmisc2c() {
PyDict_SetItemString(d,"wxEXEC_ASYNC", PyInt_FromLong((long) wxEXEC_ASYNC)); PyDict_SetItemString(d,"wxEXEC_ASYNC", PyInt_FromLong((long) wxEXEC_ASYNC));
PyDict_SetItemString(d,"wxEXEC_SYNC", PyInt_FromLong((long) wxEXEC_SYNC)); PyDict_SetItemString(d,"wxEXEC_SYNC", PyInt_FromLong((long) wxEXEC_SYNC));
PyDict_SetItemString(d,"wxEXEC_NOHIDE", PyInt_FromLong((long) wxEXEC_NOHIDE)); PyDict_SetItemString(d,"wxEXEC_NOHIDE", PyInt_FromLong((long) wxEXEC_NOHIDE));
PyDict_SetItemString(d,"wxEXEC_MAKE_GROUP_LEADER", PyInt_FromLong((long) wxEXEC_MAKE_GROUP_LEADER));
PyDict_SetItemString(d,"wxMAILCAP_STANDARD", PyInt_FromLong((long) wxMAILCAP_STANDARD)); PyDict_SetItemString(d,"wxMAILCAP_STANDARD", PyInt_FromLong((long) wxMAILCAP_STANDARD));
PyDict_SetItemString(d,"wxMAILCAP_NETSCAPE", PyInt_FromLong((long) wxMAILCAP_NETSCAPE)); PyDict_SetItemString(d,"wxMAILCAP_NETSCAPE", PyInt_FromLong((long) wxMAILCAP_NETSCAPE));
PyDict_SetItemString(d,"wxMAILCAP_KDE", PyInt_FromLong((long) wxMAILCAP_KDE)); PyDict_SetItemString(d,"wxMAILCAP_KDE", PyInt_FromLong((long) wxMAILCAP_KDE));

View File

@@ -367,9 +367,6 @@ class wxLogPtr :
def HasPendingMessages(self, *_args, **_kwargs): def HasPendingMessages(self, *_args, **_kwargs):
val = apply(misc2c.wxLog_HasPendingMessages,(self,) + _args, _kwargs) val = apply(misc2c.wxLog_HasPendingMessages,(self,) + _args, _kwargs)
return val return val
def SetVerbose(self, *_args, **_kwargs):
val = apply(misc2c.wxLog_SetVerbose,(self,) + _args, _kwargs)
return val
def GetVerbose(self, *_args, **_kwargs): def GetVerbose(self, *_args, **_kwargs):
val = apply(misc2c.wxLog_GetVerbose,(self,) + _args, _kwargs) val = apply(misc2c.wxLog_GetVerbose,(self,) + _args, _kwargs)
return val return val
@@ -1184,6 +1181,8 @@ wxLog_Suspend = misc2c.wxLog_Suspend
wxLog_Resume = misc2c.wxLog_Resume wxLog_Resume = misc2c.wxLog_Resume
wxLog_SetVerbose = misc2c.wxLog_SetVerbose
wxLog_DontCreateOnDemand = misc2c.wxLog_DontCreateOnDemand wxLog_DontCreateOnDemand = misc2c.wxLog_DontCreateOnDemand
wxLog_SetTraceMask = misc2c.wxLog_SetTraceMask wxLog_SetTraceMask = misc2c.wxLog_SetTraceMask
@@ -1309,6 +1308,7 @@ wxEVT_END_PROCESS = misc2c.wxEVT_END_PROCESS
wxEXEC_ASYNC = misc2c.wxEXEC_ASYNC wxEXEC_ASYNC = misc2c.wxEXEC_ASYNC
wxEXEC_SYNC = misc2c.wxEXEC_SYNC wxEXEC_SYNC = misc2c.wxEXEC_SYNC
wxEXEC_NOHIDE = misc2c.wxEXEC_NOHIDE wxEXEC_NOHIDE = misc2c.wxEXEC_NOHIDE
wxEXEC_MAKE_GROUP_LEADER = misc2c.wxEXEC_MAKE_GROUP_LEADER
wxMAILCAP_STANDARD = misc2c.wxMAILCAP_STANDARD wxMAILCAP_STANDARD = misc2c.wxMAILCAP_STANDARD
wxMAILCAP_NETSCAPE = misc2c.wxMAILCAP_NETSCAPE wxMAILCAP_NETSCAPE = misc2c.wxMAILCAP_NETSCAPE
wxMAILCAP_KDE = misc2c.wxMAILCAP_KDE wxMAILCAP_KDE = misc2c.wxMAILCAP_KDE

View File

@@ -5086,9 +5086,10 @@ static PyObject *_wrap_wxDateTime___sub__DS(PyObject *self, PyObject *args, PyOb
return _resultobj; return _resultobj;
} }
static int wxDateTime___cmp__(wxDateTime *self,const wxDateTime & other) { static int wxDateTime___cmp__(wxDateTime *self,const wxDateTime * other) {
if (*self < other) return -1; if (! other) return -1;
if (*self == other) return 0; if (*self < *other) return -1;
if (*self == *other) return 0;
return 1; return 1;
} }
static PyObject *_wrap_wxDateTime___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { static PyObject *_wrap_wxDateTime___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) {
@@ -5119,7 +5120,7 @@ static PyObject *_wrap_wxDateTime___cmp__(PyObject *self, PyObject *args, PyObje
} }
{ {
PyThreadState* __tstate = wxPyBeginAllowThreads(); PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (int )wxDateTime___cmp__(_arg0,*_arg1); _result = (int )wxDateTime___cmp__(_arg0,_arg1);
wxPyEndAllowThreads(__tstate); wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL; if (PyErr_Occurred()) return NULL;
@@ -6220,9 +6221,10 @@ static PyObject *_wrap_wxTimeSpan___neg__(PyObject *self, PyObject *args, PyObje
return _resultobj; return _resultobj;
} }
static int wxTimeSpan___cmp__(wxTimeSpan *self,const wxTimeSpan & other) { static int wxTimeSpan___cmp__(wxTimeSpan *self,const wxTimeSpan * other) {
if (*self < other) return -1; if (! other) return -1;
if (*self == other) return 0; if (*self < *other) return -1;
if (*self == *other) return 0;
return 1; return 1;
} }
static PyObject *_wrap_wxTimeSpan___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { static PyObject *_wrap_wxTimeSpan___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) {
@@ -6253,7 +6255,7 @@ static PyObject *_wrap_wxTimeSpan___cmp__(PyObject *self, PyObject *args, PyObje
} }
{ {
PyThreadState* __tstate = wxPyBeginAllowThreads(); PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (int )wxTimeSpan___cmp__(_arg0,*_arg1); _result = (int )wxTimeSpan___cmp__(_arg0,_arg1);
wxPyEndAllowThreads(__tstate); wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL; if (PyErr_Occurred()) return NULL;

View File

@@ -748,9 +748,10 @@ public:
wxDateTime __sub__TS(const wxTimeSpan& other) { return *self - other; } wxDateTime __sub__TS(const wxTimeSpan& other) { return *self - other; }
wxDateTime __sub__DS(const wxDateSpan& other) { return *self - other; } wxDateTime __sub__DS(const wxDateSpan& other) { return *self - other; }
int __cmp__(const wxDateTime& other) { int __cmp__(const wxDateTime* other) {
if (*self < other) return -1; if (! other) return -1;
if (*self == other) return 0; if (*self < *other) return -1;
if (*self == *other) return 0;
return 1; return 1;
} }
} }
@@ -895,9 +896,10 @@ public:
wxTimeSpan __mul__(int n) { return *self * n; } wxTimeSpan __mul__(int n) { return *self * n; }
wxTimeSpan __rmul__(int n) { return n * *self; } wxTimeSpan __rmul__(int n) { return n * *self; }
wxTimeSpan __neg__() { return self->Negate(); } wxTimeSpan __neg__() { return self->Negate(); }
int __cmp__(const wxTimeSpan& other) { int __cmp__(const wxTimeSpan* other) {
if (*self < other) return -1; if (! other) return -1;
if (*self == other) return 0; if (*self < *other) return -1;
if (*self == *other) return 0;
return 1; return 1;
} }
} }