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

@@ -77,9 +77,8 @@ public:
def __str__(self): return str(self.asTuple())
def __repr__(self): return 'wx.Colour' + str(self.asTuple())
def __nonzero__(self): return self.Ok()
def __getinitargs__(self): return ()
def __getstate__(self): return self.asTuple()
def __setstate__(self, state): self.Set(*state)
__safe_for_unpickling__ = True
def __reduce__(self): return (Colour, self.Get())
}
};