Fix GetAmPmStrings wrapper

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2005-02-28 18:40:52 +00:00
parent e63d6c308f
commit 2b020ec774

View File

@@ -363,11 +363,24 @@ public:
static wxString GetWeekDayName(WeekDay weekday,
NameFlags flags = Name_Full);
DocDeclAStr(
static void, GetAmPmStrings(wxString *OUTPUT, wxString *OUTPUT),
"GetAmPmStrings() -> (am, pm)",
"Get the AM and PM strings in the current locale (may be empty)", "");
%extend {
DocAStr(
GetAmPmStrings,
"GetAmPmStrings() -> (am, pm)",
"Get the AM and PM strings in the current locale (may be empty)", "");
static PyObject* GetAmPmStrings() {
wxString am;
wxString pm;
wxDateTime::GetAmPmStrings(&am, &pm);
bool blocked = wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(2);
PyTuple_SET_ITEM(tup, 0, wx2PyString(am));
PyTuple_SET_ITEM(tup, 1, wx2PyString(pm));
wxPyEndBlockThreads(blocked);
return tup;
}
}
// return True if the given country uses DST for this year
static bool IsDSTApplicable(int year = Inv_Year,
Country country = Country_Default);