Update SWIG patch to output "True" ("False") in the autodoc string

when "true" ("false") is in the .i file.

Changed the .i files to use true/false to avoid collisions with any
True/False in headers that may be included.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-09-23 20:23:54 +00:00
parent f2ac038698
commit a72f4631fe
64 changed files with 425 additions and 426 deletions

View File

@@ -282,7 +282,7 @@ public:
void CreateAbortWindow(wxWindow* parent, wxPyPrintout* printout);
wxPrintDialogData& GetPrintDialogData();
bool Print(wxWindow *parent, wxPyPrintout *printout, int prompt=True);
bool Print(wxWindow *parent, wxPyPrintout *printout, int prompt=true);
wxDC* PrintDialog(wxWindow *parent);
void ReportError(wxWindow *parent, wxPyPrintout *printout, const wxString& message);
bool Setup(wxWindow *parent);
@@ -299,7 +299,7 @@ public:
// Since this one would be tough and ugly to do with the Macros...
void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
bool hadErr = False;
bool hadErr = false;
bool found;
bool blocked = wxPyBeginBlockThreads();
@@ -310,22 +310,22 @@ void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *p
val = PyTuple_GetItem(result, 0);
if (PyInt_Check(val)) *minPage = PyInt_AsLong(val);
else hadErr = True;
else hadErr = true;
val = PyTuple_GetItem(result, 1);
if (PyInt_Check(val)) *maxPage = PyInt_AsLong(val);
else hadErr = True;
else hadErr = true;
val = PyTuple_GetItem(result, 2);
if (PyInt_Check(val)) *pageFrom = PyInt_AsLong(val);
else hadErr = True;
else hadErr = true;
val = PyTuple_GetItem(result, 3);
if (PyInt_Check(val)) *pageTo = PyInt_AsLong(val);
else hadErr = True;
else hadErr = true;
}
else
hadErr = True;
hadErr = true;
if (hadErr) {
PyErr_SetString(PyExc_TypeError, "GetPageInfo should return a tuple of 4 integers.");
@@ -560,30 +560,30 @@ public:
%{
#define DEC_PYCALLBACK_BOOL_PREWINDC(CBNAME) \
bool CBNAME(wxPreviewCanvas* a, wxDC& b); \
#define DEC_PYCALLBACK_BOOL_PREWINDC(CBNAME) \
bool CBNAME(wxPreviewCanvas* a, wxDC& b); \
bool base_##CBNAME(wxPreviewCanvas* a, wxDC& b)
#define IMP_PYCALLBACK_BOOL_PREWINDC(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(wxPreviewCanvas* a, wxDC& b) { \
bool rval=False; \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
PyObject* win = wxPyMake_wxObject(a,false); \
PyObject* dc = wxPyMake_wxObject(&b,false); \
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)", win, dc));\
Py_DECREF(win); \
Py_DECREF(dc); \
} \
wxPyEndBlockThreads(blocked); \
if (! found) \
rval = PCLASS::CBNAME(a, b); \
return rval; \
} \
bool CLASS::base_##CBNAME(wxPreviewCanvas* a, wxDC& b) { \
return PCLASS::CBNAME(a, b); \
#define IMP_PYCALLBACK_BOOL_PREWINDC(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(wxPreviewCanvas* a, wxDC& b) { \
bool rval=false; \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
PyObject* win = wxPyMake_wxObject(a,false); \
PyObject* dc = wxPyMake_wxObject(&b,false); \
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)", win, dc)); \
Py_DECREF(win); \
Py_DECREF(dc); \
} \
wxPyEndBlockThreads(blocked); \
if (! found) \
rval = PCLASS::CBNAME(a, b); \
return rval; \
} \
bool CLASS::base_##CBNAME(wxPreviewCanvas* a, wxDC& b) { \
return PCLASS::CBNAME(a, b); \
}