Some little compilation fixes, etc.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
1999-12-24 18:45:22 +00:00
parent d2103cf2e2
commit 194fa2aca0
5 changed files with 13 additions and 12 deletions

View File

@@ -208,7 +208,7 @@ PyObject* __wxStart(PyObject* /* self */, PyObject* args)
} }
bResult = PyInt_AS_LONG(result); bResult = PyInt_AS_LONG(result);
if (! bResult) { if (! bResult) {
PyErr_SetString(PyExc_SystemExit, "OnInit returned false, exiting..."); PyErr_SetString(PyExc_SystemExit, "OnInit returned FALSE, exiting...");
return NULL; return NULL;
} }
@@ -457,7 +457,7 @@ PyObject* wxPyCallbackHelper::callCallbackObj(PyObject* argTuple) {
wxPyEvtSelfRef::wxPyEvtSelfRef() { wxPyEvtSelfRef::wxPyEvtSelfRef() {
//m_self = Py_None; // **** We don't do normal ref counting to prevent //m_self = Py_None; // **** We don't do normal ref counting to prevent
//Py_INCREF(m_self); // circular loops... //Py_INCREF(m_self); // circular loops...
m_cloned = false; m_cloned = FALSE;
} }
wxPyEvtSelfRef::~wxPyEvtSelfRef() { wxPyEvtSelfRef::~wxPyEvtSelfRef() {

View File

@@ -313,7 +313,7 @@ public:
bool doSave = wxPyRestoreThread(); \ bool doSave = wxPyRestoreThread(); \
if (m_myInst.findCallback(#CBNAME)) \ if (m_myInst.findCallback(#CBNAME)) \
rval = m_myInst.callCallback(Py_BuildValue("(i)",a)); \ rval = m_myInst.callCallback(Py_BuildValue("(i)",a)); \
else rval = false; \ else rval = FALSE; \
wxPySaveThread(doSave); \ wxPySaveThread(doSave); \
return rval; \ return rval; \
} }
@@ -741,7 +741,7 @@ public:
#define IMP_PYCALLBACK_BOOL_TAG_pure(CLASS, PCLASS, CBNAME) \ #define IMP_PYCALLBACK_BOOL_TAG_pure(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(const wxHtmlTag& a) { \ bool CLASS::CBNAME(const wxHtmlTag& a) { \
bool rval = false; \ bool rval = FALSE; \
bool doSave = wxPyRestoreThread(); \ bool doSave = wxPyRestoreThread(); \
if (m_myInst.findCallback(#CBNAME)) \ if (m_myInst.findCallback(#CBNAME)) \
rval = m_myInst.callCallback(Py_BuildValue("(O)", \ rval = m_myInst.callCallback(Py_BuildValue("(O)", \

View File

@@ -401,8 +401,6 @@ SWIG_GetPtrObj(PyObject *obj, void **ptr, char *type) {
if (!PyString_Check(obj)) { if (!PyString_Check(obj)) {
if (!PyInstance_Check(obj) || !(sobj = PyObject_GetAttrString(obj,"this"))) if (!PyInstance_Check(obj) || !(sobj = PyObject_GetAttrString(obj,"this")))
return ""; return "";
// sobj = PyObject_GetAttrString(obj,"this");
// if (!sobj) return "";
} }
str = PyString_AsString(sobj); str = PyString_AsString(sobj);
return SWIG_GetPtr(str,ptr,type); return SWIG_GetPtr(str,ptr,type);

View File

@@ -204,7 +204,7 @@ public:
// Since this one would be tough and ugly to do with the Macros... // Since this one would be tough and ugly to do with the Macros...
void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) { void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
bool hadErr = false; bool hadErr = FALSE;
bool doSave = wxPyRestoreThread(); bool doSave = wxPyRestoreThread();
if (m_myInst.findCallback("GetPageInfo")) { if (m_myInst.findCallback("GetPageInfo")) {
@@ -214,22 +214,22 @@ void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *p
val = PyTuple_GetItem(result, 0); val = PyTuple_GetItem(result, 0);
if (PyInt_Check(val)) *minPage = PyInt_AsLong(val); if (PyInt_Check(val)) *minPage = PyInt_AsLong(val);
else hadErr = true; else hadErr = TRUE;
val = PyTuple_GetItem(result, 1); val = PyTuple_GetItem(result, 1);
if (PyInt_Check(val)) *maxPage = PyInt_AsLong(val); if (PyInt_Check(val)) *maxPage = PyInt_AsLong(val);
else hadErr = true; else hadErr = TRUE;
val = PyTuple_GetItem(result, 2); val = PyTuple_GetItem(result, 2);
if (PyInt_Check(val)) *pageFrom = PyInt_AsLong(val); if (PyInt_Check(val)) *pageFrom = PyInt_AsLong(val);
else hadErr = true; else hadErr = TRUE;
val = PyTuple_GetItem(result, 3); val = PyTuple_GetItem(result, 3);
if (PyInt_Check(val)) *pageTo = PyInt_AsLong(val); if (PyInt_Check(val)) *pageTo = PyInt_AsLong(val);
else hadErr = true; else hadErr = TRUE;
} }
else else
hadErr = true; hadErr = TRUE;
if (hadErr) { if (hadErr) {
PyErr_SetString(PyExc_TypeError, "GetPageInfo should return a tuple of 4 integers."); PyErr_SetString(PyExc_TypeError, "GetPageInfo should return a tuple of 4 integers.");

View File

@@ -1,7 +1,10 @@
hh_test.py hh_test.py
listGetItem.pyc
setup.bat setup.bat
test.out
test1.pyc test1.pyc
test4.pyc test4.pyc
test6.pyc test6.pyc
test8.pyc test8.pyc
testDlg.pyc
th_test.py th_test.py