X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8381e4cdd3afb82e4a77038b5f9abae7404b500c..11ef82e90a168b08a6a6d472455dbdf55230b071:/wxPython/src/gtk/utils.cpp?ds=sidebyside diff --git a/wxPython/src/gtk/utils.cpp b/wxPython/src/gtk/utils.cpp index b4920a86fe..79b7f37f73 100644 --- a/wxPython/src/gtk/utils.cpp +++ b/wxPython/src/gtk/utils.cpp @@ -5127,10 +5127,16 @@ static PyObject *_wrap_wxDateTime___cmp__(PyObject *self, PyObject *args, PyObje return _resultobj; } -#define wxDateTime_ParseRfc822Date(_swigobj,_swigarg0) (_swigobj->ParseRfc822Date(_swigarg0)) +static int wxDateTime_ParseRfc822Date(wxDateTime *self,const wxString & date) { + const wxChar* rv; + const wxChar* _date = date; + rv = self->ParseRfc822Date(_date); + if (rv == NULL) return -1; + return rv - _date; + } static PyObject *_wrap_wxDateTime_ParseRfc822Date(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxString * _result; + int _result; wxDateTime * _arg0; wxString * _arg1; PyObject * _argo0 = 0; @@ -5154,31 +5160,28 @@ static PyObject *_wrap_wxDateTime_ParseRfc822Date(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDateTime_ParseRfc822Date(_arg0,*_arg1)); + _result = (int )wxDateTime_ParseRfc822Date(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -}{ -#if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); -#else - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -#endif -} +} _resultobj = Py_BuildValue("i",_result); { if (_obj1) delete _arg1; -} -{ - delete _result; } return _resultobj; } -#define wxDateTime_ParseFormat(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->ParseFormat(_swigarg0,_swigarg1,_swigarg2)) +static int wxDateTime_ParseFormat(wxDateTime *self,const wxString & date,const wxString & format,const wxDateTime & dateDef) { + const wxChar* rv; + const wxChar* _date = date; + rv = self->ParseFormat(_date, format, dateDef); + if (rv == NULL) return -1; + return rv - _date; + } static PyObject *_wrap_wxDateTime_ParseFormat(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxString * _result; + int _result; wxDateTime * _arg0; wxString * _arg1; wxString * _arg2 = (wxString *) &wxPyDateFormatStr; @@ -5219,17 +5222,11 @@ static PyObject *_wrap_wxDateTime_ParseFormat(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDateTime_ParseFormat(_arg0,*_arg1,*_arg2,*_arg3)); + _result = (int )wxDateTime_ParseFormat(_arg0,*_arg1,*_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -}{ -#if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); -#else - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -#endif -} +} _resultobj = Py_BuildValue("i",_result); { if (_obj1) delete _arg1; @@ -5237,17 +5234,20 @@ static PyObject *_wrap_wxDateTime_ParseFormat(PyObject *self, PyObject *args, Py { if (_obj2) delete _arg2; -} -{ - delete _result; } return _resultobj; } -#define wxDateTime_ParseDateTime(_swigobj,_swigarg0) (_swigobj->ParseDateTime(_swigarg0)) +static int wxDateTime_ParseDateTime(wxDateTime *self,const wxString & datetime) { + const wxChar* rv; + const wxChar* _datetime = datetime; + rv = self->ParseDateTime(_datetime); + if (rv == NULL) return -1; + return rv - _datetime; + } static PyObject *_wrap_wxDateTime_ParseDateTime(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxString * _result; + int _result; wxDateTime * _arg0; wxString * _arg1; PyObject * _argo0 = 0; @@ -5271,31 +5271,28 @@ static PyObject *_wrap_wxDateTime_ParseDateTime(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDateTime_ParseDateTime(_arg0,*_arg1)); + _result = (int )wxDateTime_ParseDateTime(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -}{ -#if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); -#else - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -#endif -} +} _resultobj = Py_BuildValue("i",_result); { if (_obj1) delete _arg1; -} -{ - delete _result; } return _resultobj; } -#define wxDateTime_ParseDate(_swigobj,_swigarg0) (_swigobj->ParseDate(_swigarg0)) +static int wxDateTime_ParseDate(wxDateTime *self,const wxString & date) { + const wxChar* rv; + const wxChar* _date = date; + rv = self->ParseDate(_date); + if (rv == NULL) return -1; + return rv - _date; + } static PyObject *_wrap_wxDateTime_ParseDate(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxString * _result; + int _result; wxDateTime * _arg0; wxString * _arg1; PyObject * _argo0 = 0; @@ -5319,31 +5316,28 @@ static PyObject *_wrap_wxDateTime_ParseDate(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDateTime_ParseDate(_arg0,*_arg1)); + _result = (int )wxDateTime_ParseDate(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -}{ -#if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); -#else - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -#endif -} +} _resultobj = Py_BuildValue("i",_result); { if (_obj1) delete _arg1; -} -{ - delete _result; } return _resultobj; } -#define wxDateTime_ParseTime(_swigobj,_swigarg0) (_swigobj->ParseTime(_swigarg0)) +static int wxDateTime_ParseTime(wxDateTime *self,const wxString & time) { + const wxChar* rv; + const wxChar* _time = time; + rv = self->ParseTime(_time); + if (rv == NULL) return -1; + return rv - _time; + } static PyObject *_wrap_wxDateTime_ParseTime(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxString * _result; + int _result; wxDateTime * _arg0; wxString * _arg1; PyObject * _argo0 = 0; @@ -5367,23 +5361,14 @@ static PyObject *_wrap_wxDateTime_ParseTime(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxDateTime_ParseTime(_arg0,*_arg1)); + _result = (int )wxDateTime_ParseTime(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -}{ -#if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); -#else - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -#endif -} +} _resultobj = Py_BuildValue("i",_result); { if (_obj1) delete _arg1; -} -{ - delete _result; } return _resultobj; } @@ -7882,9 +7867,11 @@ SWIGEXPORT(void) initutilsc() { PyDict_SetItemString(d,"wxCONFIG_USE_LOCAL_FILE", PyInt_FromLong((long) wxCONFIG_USE_LOCAL_FILE)); PyDict_SetItemString(d,"wxCONFIG_USE_GLOBAL_FILE", PyInt_FromLong((long) wxCONFIG_USE_GLOBAL_FILE)); PyDict_SetItemString(d,"wxCONFIG_USE_RELATIVE_PATH", PyInt_FromLong((long) wxCONFIG_USE_RELATIVE_PATH)); + PyDict_SetItemString(d,"wxCONFIG_USE_NO_ESCAPE_CHARACTERS", PyInt_FromLong((long) wxCONFIG_USE_NO_ESCAPE_CHARACTERS)); - wxClassInfo::CleanUpClasses(); - wxClassInfo::InitializeClasses(); + // These are no longer needed since utils is back in the core +// wxClassInfo::CleanUpClasses(); +// wxClassInfo::InitializeClasses(); PyDict_SetItemString(d,"wxConfigBase_Type_Unknown", PyInt_FromLong((long) wxConfigBase::Type_Unknown)); PyDict_SetItemString(d,"wxConfigBase_Type_String", PyInt_FromLong((long) wxConfigBase::Type_String)); PyDict_SetItemString(d,"wxConfigBase_Type_Boolean", PyInt_FromLong((long) wxConfigBase::Type_Boolean));