]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxPython/src/helpers.h
Made db.h compile (removed this wxODBC_ONLY_FARWRD_XXXXXX),
[wxWidgets.git] / utils / wxPython / src / helpers.h
index 0d39ba00388f57f5a42141086473a483a474a872..57f670fb19cdff62cad4c4aea17f05f395b9a0f0 100644 (file)
@@ -179,6 +179,7 @@ public:
 private:
     PyObject*   m_self;
     PyObject*   m_lastFound;
+    int         m_incRef;
 };
 
 
@@ -189,10 +190,10 @@ private:
 // themselves and some special case handling in wxPyCallback::EventThunker.
 
 
-class wxPySelfRef {
+class wxPyEvtSelfRef {
 public:
-    wxPySelfRef();
-    ~wxPySelfRef();
+    wxPyEvtSelfRef();
+    ~wxPyEvtSelfRef();
 
     void SetSelf(PyObject* self, bool clone=FALSE);
     PyObject* GetSelf() const;
@@ -203,7 +204,7 @@ protected:
 };
 
 
-class wxPyEvent : public wxEvent, public wxPySelfRef {
+class wxPyEvent : public wxEvent, public wxPyEvtSelfRef {
     DECLARE_DYNAMIC_CLASS(wxPyEvent)
 public:
     wxPyEvent(int id=0);
@@ -213,7 +214,7 @@ public:
 };
 
 
-class wxPyCommandEvent : public wxCommandEvent, public wxPySelfRef {
+class wxPyCommandEvent : public wxCommandEvent, public wxPyEvtSelfRef {
     DECLARE_DYNAMIC_CLASS(wxPyCommandEvent)
 public:
     wxPyCommandEvent(wxEventType commandType = wxEVT_NULL, int id=0);
@@ -230,7 +231,7 @@ public:
 //---------------------------------------------------------------------------
 
 #define PYPRIVATE                                       \
-    void _setSelf(PyObject* self, int incref=TRUE) {    \
+    void _setSelf(PyObject* self, int incref=1) {       \
         m_myInst.setSelf(self, incref);                 \
     }                                                   \
     private: wxPyCallbackHelper m_myInst;