%{
#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));
+ temp = True;
}
%typemap(python,freearg) wxDateTime::TimeZone& {
- if ($1) delete $1;
+ if (temp$argnum) delete $1;
}