Since they are new style classes we need to use the __reduce__

protocol for pickling.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-12-29 23:06:38 +00:00
parent 0dfb2393dd
commit 02376d7348
3 changed files with 16 additions and 25 deletions

View File

@@ -94,9 +94,8 @@ public:
elif index == 1: self.SetCol(val)
else: raise IndexError
def __nonzero__(self): return self.Get() != (0,0)
def __getinitargs__(self): return ()
def __getstate__(self): return self.Get()
def __setstate__(self, state): self.Set(*state)
__safe_for_unpickling__ = True
def __reduce__(self): return (wx.GBPosition, self.Get())
}
%pythoncode {
@@ -147,9 +146,8 @@ public:
elif index == 1: self.SetColspan(val)
else: raise IndexError
def __nonzero__(self): return self.Get() != (0,0)
def __getinitargs__(self): return ()
def __getstate__(self): return self.Get()
def __setstate__(self, state): self.Set(*state)
__safe_for_unpickling__ = True
def __reduce__(self): return (wx.GBSpan, self.Get())
}
%pythoncode {