]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_datetime.i
Clean out the old stuff
[wxWidgets.git] / wxPython / src / _datetime.i
index 1142cb30fb2901fd662e4287923d65eed8aad09b..13b2b50eac05a5d9f44f94657a889b28f69d3414 100644 (file)
 %{
 #include <wx/datetime.h>
 
 %{
 #include <wx/datetime.h>
 
-    DECLARE_DEF_STRING2(DateFormatStr, wxT("%c"));
-    DECLARE_DEF_STRING2(TimeSpanFormatStr, wxT("%H:%M:%S"));
-
-%}    
+%}
+MAKE_CONST_WXSTRING2(DateFormatStr, wxT("%c"));
+MAKE_CONST_WXSTRING2(TimeSpanFormatStr, wxT("%H:%M:%S"));
 
 //---------------------------------------------------------------------------
 
 
 
 //---------------------------------------------------------------------------
 
 
-%typemap(in) wxDateTime::TimeZone& {
+%typemap(in) wxDateTime::TimeZone& (bool temp=False) {
     $1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong($input));
     $1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong($input));
+    temp = True;
 }
 %typemap(python,freearg) wxDateTime::TimeZone& {
 }
 %typemap(python,freearg) wxDateTime::TimeZone& {
-    if ($1) delete $1;
+    if (temp$argnum) delete $1;
 }
 
 
 }