X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/137b5242b1834999da2883c7a68fbde28c6fba37..ccdcde00d9ae27ca20ff6c3c9495918a0ec725aa:/wxPython/src/utils.i diff --git a/wxPython/src/utils.i b/wxPython/src/utils.i index a037def99f..24a33a10ef 100644 --- a/wxPython/src/utils.i +++ b/wxPython/src/utils.i @@ -14,7 +14,7 @@ %module utils %{ -#include "export.h" +#include "helpers.h" #include #include #include @@ -23,8 +23,7 @@ //--------------------------------------------------------------------------- %{ // Put some wx default wxChar* values into wxStrings. - static const wxChar* wxDateFormatStr = wxT("sashWindow"); - DECLARE_DEF_STRING(DateFormatStr); + DECLARE_DEF_STRING2(DateFormatStr, wxT("sashWindow")); static const wxString wxPyEmptyString(wxT("")); %} @@ -748,9 +747,10 @@ public: wxDateTime __sub__TS(const wxTimeSpan& other) { return *self - other; } wxDateTime __sub__DS(const wxDateSpan& other) { return *self - other; } - int __cmp__(const wxDateTime& other) { - if (*self < other) return -1; - if (*self == other) return 0; + int __cmp__(const wxDateTime* other) { + if (! other) return -1; + if (*self < *other) return -1; + if (*self == *other) return 0; return 1; } } @@ -895,9 +895,10 @@ public: wxTimeSpan __mul__(int n) { return *self * n; } wxTimeSpan __rmul__(int n) { return n * *self; } wxTimeSpan __neg__() { return self->Negate(); } - int __cmp__(const wxTimeSpan& other) { - if (*self < other) return -1; - if (*self == other) return 0; + int __cmp__(const wxTimeSpan* other) { + if (! other) return -1; + if (*self < *other) return -1; + if (*self == *other) return 0; return 1; } }