]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/filesys.i
added wx/defs.h include to correct compilation issues under Mac OS X
[wxWidgets.git] / wxPython / src / filesys.i
index 7fc6c420c60a2eb01455e534606967c0d72a2966..60e5b93abe62a7a0fb648781ddad6517bb3af5c0 100644 (file)
@@ -75,7 +75,9 @@
 //              Py_DECREF(arg);
 
 //              // set ThisOwn
 //              Py_DECREF(arg);
 
 //              // set ThisOwn
-//              PyObject_SetAttrString($target, "thisown", PyInt_FromLong(1));
+//              PyObject* one = PyInt_FromLong(1);
+//              PyObject_SetAttrString($target, "thisown", one);
+//              Py_DECREF(one);
 //          }
 //      } else {
 //          Py_INCREF(Py_None);
 //          }
 //      } else {
 //          Py_INCREF(Py_None);
@@ -85,7 +87,7 @@
 
 
 
 
 
 
-class wxFSFile {
+class wxFSFile : public wxObject {
 public:
     wxFSFile(wxInputStream *stream, const wxString& loc,
              const wxString& mimetype, const wxString& anchor,
 public:
     wxFSFile(wxInputStream *stream, const wxString& loc,
              const wxString& mimetype, const wxString& anchor,
@@ -149,8 +151,8 @@ IMP_PYCALLBACK_STRING__pure(wxPyFileSystemHandler, wxFileSystemHandler, FindNext
 %}
 
 
 %}
 
 
-%name(wxCPPFileSystemHandler)class wxFileSystemHandler {
-      wxFileSystemHandler();
+%name(wxCPPFileSystemHandler)class wxFileSystemHandler : public wxObject {
+    wxFileSystemHandler();
 }
 
 %name(wxFileSystemHandler)class wxPyFileSystemHandler : public wxFileSystemHandler {
 }
 
 %name(wxFileSystemHandler)class wxPyFileSystemHandler : public wxFileSystemHandler {
@@ -174,7 +176,7 @@ public:
 
 //---------------------------------------------------------------------------
 
 
 //---------------------------------------------------------------------------
 
-class wxFileSystem {
+class wxFileSystem : public wxObject {
 public:
     wxFileSystem();
 
 public:
     wxFileSystem();
 
@@ -271,4 +273,10 @@ def wxMemoryFSHandler_AddFile(filename, a, b=''):
 "
 
 
 "
 
 
+//---------------------------------------------------------------------------
+
+%init %{
+    wxPyPtrTypeMap_Add("wxFileSystemHandler", "wxPyFileSystemHandler");
+%}
+
 //---------------------------------------------------------------------------
 //---------------------------------------------------------------------------