X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/02b800ce7c2bb1c1f08075f22be2e7412124b47f..89a3d0f77289fe8a39757bfc3bfe3704c009d224:/wxPython/src/_datetime.i diff --git a/wxPython/src/_datetime.i b/wxPython/src/_datetime.i index 702c6ff32d..322c03a7eb 100644 --- a/wxPython/src/_datetime.i +++ b/wxPython/src/_datetime.i @@ -30,7 +30,7 @@ MAKE_CONST_WXSTRING(DefaultTimeSpanFormat); $1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong($input)); temp = true; } -%typemap(python,freearg) wxDateTime::TimeZone& { +%typemap(freearg) wxDateTime::TimeZone& { if (temp$argnum) delete $1; } @@ -42,7 +42,7 @@ MAKE_CONST_WXSTRING(DefaultTimeSpanFormat); // Convert a wxLongLong to a Python Long by getting the hi/lo dwords, then // shifting and oring them together -%typemap(python, out) wxLongLong { +%typemap(out) wxLongLong { PyObject *hi, *lo, *shifter, *shifted; hi = PyLong_FromLong( $1.GetHi() ); lo = PyLong_FromLong( $1.GetLo() ); @@ -426,6 +426,7 @@ public: wxDateTime_t minute = 0, wxDateTime_t second = 0, wxDateTime_t millisec = 0)); + %RenameCtor(DateTimeFromDateTime, wxDateTime(const wxDateTime& date)); ~wxDateTime(); @@ -894,9 +895,16 @@ public: class wxTimeSpan { public: + + // TODO: Need an input typemap for wxLongLong... + + + // return the timespan for the given number of milliseconds + static wxTimeSpan Milliseconds(/*wxLongLong*/ long ms); + static wxTimeSpan Millisecond(); // return the timespan for the given number of seconds - static wxTimeSpan Seconds(long sec); + static wxTimeSpan Seconds(/*wxLongLong*/ long sec); static wxTimeSpan Second(); // return the timespan for the given number of minutes @@ -923,8 +931,8 @@ public: // milliseconds) wxTimeSpan(long hours = 0, long minutes = 0, - long seconds = 0, - long milliseconds = 0); + /*wxLongLong*/ long seconds = 0, + /*wxLongLong*/ long milliseconds = 0); ~wxTimeSpan();