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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user