/* Implementation : PYTHON */
#define SWIGPYTHON
+#include "Python.h"
+
#include <string.h>
#include <stdlib.h>
/* Definitions for Windows/Unix exporting */
# define SWIGEXPORT(a) a
#endif
-#include "Python.h"
-
#ifdef __cplusplus
extern "C" {
#endif
-
extern void SWIG_MakePtr(char *, void *, char *);
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
extern char *SWIG_GetPtr(char *, void **, char *);
#define SWIG_name "utilsc"
-#include "export.h"
+#include "helpers.h"
#include <wx/config.h>
#include <wx/fileconf.h>
#include <wx/datetime.h>
// Put some wx default wxChar* values into wxStrings.
- static const wxChar* wxDateFormatStr = wxT("sashWindow");
- DECLARE_DEF_STRING(DateFormatStr);
+ DECLARE_DEF_STRING2(DateFormatStr, wxT("%c"));
static const wxString wxPyEmptyString(wxT(""));
if (ret) {
PyTuple_SET_ITEM(ret, 0, PyInt_FromLong(flag));
#if wxUSE_UNICODE
- PyTuple_SET_ITEM(ret, 1, PyUnicode_FromUnicode(str.c_str(), str.Len()));
+ PyTuple_SET_ITEM(ret, 1, PyUnicode_FromWideChar(str.c_str(), str.Len()));
#else
PyTuple_SET_ITEM(ret, 1, PyString_FromStringAndSize(str.c_str(), str.Len()));
#endif
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
- _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
+ _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
- _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
+ _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
- _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
+ _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
- _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
+ _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
- _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
+ _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
- _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
+ _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
- _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
+ _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
return _resultobj;
}
+static PyObject *_wrap_wxDateTime_UNow(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxDateTime * _result;
+ char *_kwnames[] = { NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDateTime_UNow",_kwnames))
+ return NULL;
+{
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ _result = new wxDateTime (wxDateTime::UNow());
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) return NULL;
+} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ return _resultobj;
+}
+
static PyObject *_wrap_wxDateTime_Today(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxDateTime * _result;
return _resultobj;
}
-#define wxDateTime_SetToWeekDayInSameWeek(_swigobj,_swigarg0) (_swigobj->SetToWeekDayInSameWeek(_swigarg0))
+#define wxDateTime_SetToWeekDayInSameWeek(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetToWeekDayInSameWeek(_swigarg0,_swigarg1))
static PyObject *_wrap_wxDateTime_SetToWeekDayInSameWeek(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxDateTime * _result;
wxDateTime * _arg0;
wxDateTime::WeekDay _arg1;
+ wxDateTime::WeekFlags _arg2 = (wxDateTime::WeekFlags ) wxDateTime::Monday_First;
PyObject * _argo0 = 0;
- char *_kwnames[] = { "self","weekday", NULL };
+ char *_kwnames[] = { "self","weekday","flags", NULL };
char _ptemp[128];
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_SetToWeekDayInSameWeek",_kwnames,&_argo0,&_arg1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxDateTime_SetToWeekDayInSameWeek",_kwnames,&_argo0,&_arg1,&_arg2))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxDateTime & _result_ref = wxDateTime_SetToWeekDayInSameWeek(_arg0,_arg1);
+ wxDateTime & _result_ref = wxDateTime_SetToWeekDayInSameWeek(_arg0,_arg1,_arg2);
_result = (wxDateTime *) &_result_ref;
wxPyEndAllowThreads(__tstate);
return _resultobj;
}
-#define wxDateTime_GetWeekDayInSameWeek(_swigobj,_swigarg0) (_swigobj->GetWeekDayInSameWeek(_swigarg0))
+#define wxDateTime_GetWeekDayInSameWeek(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetWeekDayInSameWeek(_swigarg0,_swigarg1))
static PyObject *_wrap_wxDateTime_GetWeekDayInSameWeek(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxDateTime * _result;
wxDateTime * _arg0;
wxDateTime::WeekDay _arg1;
+ wxDateTime::WeekFlags _arg2 = (wxDateTime::WeekFlags ) wxDateTime::Monday_First;
PyObject * _argo0 = 0;
- char *_kwnames[] = { "self","weekday", NULL };
+ char *_kwnames[] = { "self","weekday","flags", NULL };
char _ptemp[128];
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_GetWeekDayInSameWeek",_kwnames,&_argo0,&_arg1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxDateTime_GetWeekDayInSameWeek",_kwnames,&_argo0,&_arg1,&_arg2))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = new wxDateTime (wxDateTime_GetWeekDayInSameWeek(_arg0,_arg1));
+ _result = new wxDateTime (wxDateTime_GetWeekDayInSameWeek(_arg0,_arg1,_arg2));
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
return _resultobj;
}
-#define wxDateTime_SetToTheWeek(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetToTheWeek(_swigarg0,_swigarg1))
+#define wxDateTime_SetToTheWeek(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetToTheWeek(_swigarg0,_swigarg1,_swigarg2))
static PyObject *_wrap_wxDateTime_SetToTheWeek(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxDateTime * _arg0;
wxDateTime::wxDateTime_t _arg1;
wxDateTime::WeekDay _arg2 = (wxDateTime::WeekDay ) wxDateTime::Mon;
+ wxDateTime::WeekFlags _arg3 = (wxDateTime::WeekFlags ) wxDateTime::Monday_First;
PyObject * _argo0 = 0;
- char *_kwnames[] = { "self","numWeek","weekday", NULL };
+ char *_kwnames[] = { "self","numWeek","weekday","flags", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh|i:wxDateTime_SetToTheWeek",_kwnames,&_argo0,&_arg1,&_arg2))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh|ii:wxDateTime_SetToTheWeek",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (bool )wxDateTime_SetToTheWeek(_arg0,_arg1,_arg2);
+ _result = (bool )wxDateTime_SetToTheWeek(_arg0,_arg1,_arg2,_arg3);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
return _resultobj;
}
-#define wxDateTime_GetWeek(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetWeek(_swigarg0,_swigarg1))
+#define wxDateTime_GetWeek(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->GetWeek(_swigarg0,_swigarg1,_swigarg2))
static PyObject *_wrap_wxDateTime_GetWeek(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxDateTime * _result;
wxDateTime * _arg0;
wxDateTime::wxDateTime_t _arg1;
wxDateTime::WeekDay _arg2 = (wxDateTime::WeekDay ) wxDateTime::Mon;
+ wxDateTime::WeekFlags _arg3 = (wxDateTime::WeekFlags ) wxDateTime::Monday_First;
PyObject * _argo0 = 0;
- char *_kwnames[] = { "self","numWeek","weekday", NULL };
+ char *_kwnames[] = { "self","numWeek","weekday","flags", NULL };
char _ptemp[128];
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh|i:wxDateTime_GetWeek",_kwnames,&_argo0,&_arg1,&_arg2))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh|ii:wxDateTime_GetWeek",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = new wxDateTime (wxDateTime_GetWeek(_arg0,_arg1,_arg2));
+ _result = new wxDateTime (wxDateTime_GetWeek(_arg0,_arg1,_arg2,_arg3));
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsEqualTo. Expected _wxDateTime_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsEarlierThan. Expected _wxDateTime_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsLaterThan. Expected _wxDateTime_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsStrictlyBetween. Expected _wxDateTime_p.");
return NULL;
}
}
if (_argo2) {
- if (_argo2 == Py_None) { _arg2 = NULL; }
- else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) {
+ if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDateTime_IsStrictlyBetween. Expected _wxDateTime_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsBetween. Expected _wxDateTime_p.");
return NULL;
}
}
if (_argo2) {
- if (_argo2 == Py_None) { _arg2 = NULL; }
- else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) {
+ if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDateTime_IsBetween. Expected _wxDateTime_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsSameDate. Expected _wxDateTime_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsSameTime. Expected _wxDateTime_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsEqualUpTo. Expected _wxDateTime_p.");
return NULL;
}
}
if (_argo2) {
- if (_argo2 == Py_None) { _arg2 = NULL; }
- else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxTimeSpan_p")) {
+ if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxTimeSpan_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDateTime_IsEqualUpTo. Expected _wxTimeSpan_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_AddTS. Expected _wxTimeSpan_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_AddDS. Expected _wxDateSpan_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_SubtractTS. Expected _wxTimeSpan_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_SubtractDS. Expected _wxDateSpan_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_Subtract. Expected _wxDateTime_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime___add__TS. Expected _wxTimeSpan_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime___add__DS. Expected _wxDateSpan_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime___sub__DT. Expected _wxDateTime_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime___sub__TS. Expected _wxTimeSpan_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime___sub__DS. Expected _wxDateSpan_p.");
return NULL;
}
return _resultobj;
}
-static int wxDateTime___cmp__(wxDateTime *self,const wxDateTime & other) {
- if (*self < other) return -1;
- if (*self == other) return 0;
+static int wxDateTime___cmp__(wxDateTime *self,const wxDateTime * other) {
+ if (! other) return -1;
+ if (*self < *other) return -1;
+ if (*self == *other) return 0;
return 1;
}
static PyObject *_wrap_wxDateTime___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) {
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (int )wxDateTime___cmp__(_arg0,*_arg1);
+ _result = (int )wxDateTime___cmp__(_arg0,_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
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;
}
{
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;
return NULL;
}
if (_argo3) {
- if (_argo3 == Py_None) { _arg3 = NULL; }
- else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxDateTime_p")) {
+ if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxDateTime_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxDateTime_ParseFormat. Expected _wxDateTime_p.");
return NULL;
}
}
{
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;
{
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;
}
{
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;
}
{
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;
}
{
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;
}
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
- _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
+ _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
- _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
+ _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
- _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
+ _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
- _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
+ _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
- _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
+ _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan_Add. Expected _wxTimeSpan_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan_Subtract. Expected _wxTimeSpan_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan___add__. Expected _wxTimeSpan_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan___sub__. Expected _wxTimeSpan_p.");
return NULL;
}
return _resultobj;
}
-static int wxTimeSpan___cmp__(wxTimeSpan *self,const wxTimeSpan & other) {
- if (*self < other) return -1;
- if (*self == other) return 0;
+static int wxTimeSpan___cmp__(wxTimeSpan *self,const wxTimeSpan * other) {
+ if (! other) return -1;
+ if (*self < *other) return -1;
+ if (*self == *other) return 0;
return 1;
}
static PyObject *_wrap_wxTimeSpan___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) {
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (int )wxTimeSpan___cmp__(_arg0,*_arg1);
+ _result = (int )wxTimeSpan___cmp__(_arg0,_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan_IsEqualTo. Expected _wxTimeSpan_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan_IsLongerThan. Expected _wxTimeSpan_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan_IsShorterThan. Expected _wxTimeSpan_p.");
return NULL;
}
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
- _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
+ _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateSpan_Add. Expected _wxDateSpan_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateSpan_Subtract. Expected _wxDateSpan_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateSpan___add__. Expected _wxDateSpan_p.");
return NULL;
}
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateSpan___sub__. Expected _wxDateSpan_p.");
return NULL;
}
{ "new_wxDateTimeFromTimeT", (PyCFunction) _wrap_new_wxDateTimeFromTimeT, METH_VARARGS | METH_KEYWORDS },
{ "new_wxDateTime", (PyCFunction) _wrap_new_wxDateTime, METH_VARARGS | METH_KEYWORDS },
{ "wxDateTime_Today", (PyCFunction) _wrap_wxDateTime_Today, METH_VARARGS | METH_KEYWORDS },
+ { "wxDateTime_UNow", (PyCFunction) _wrap_wxDateTime_UNow, METH_VARARGS | METH_KEYWORDS },
{ "wxDateTime_Now", (PyCFunction) _wrap_wxDateTime_Now, METH_VARARGS | METH_KEYWORDS },
{ "wxDateTime_GetEndDST", (PyCFunction) _wrap_wxDateTime_GetEndDST, METH_VARARGS | METH_KEYWORDS },
{ "wxDateTime_GetBeginDST", (PyCFunction) _wrap_wxDateTime_GetBeginDST, METH_VARARGS | METH_KEYWORDS },
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();
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));