diff options
Diffstat (limited to 'Mac/Modules/win/Winmodule.c')
-rw-r--r-- | Mac/Modules/win/Winmodule.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Mac/Modules/win/Winmodule.c b/Mac/Modules/win/Winmodule.c index 800bad0..4dce0e8 100644 --- a/Mac/Modules/win/Winmodule.c +++ b/Mac/Modules/win/Winmodule.c @@ -2165,11 +2165,21 @@ static PyObject *WinObj_getattr(self, name) #define WinObj_setattr NULL -#define WinObj_compare NULL +static int WinObj_compare(self, other) + WindowObject *self, *other; +{ + if ( self->ob_itself > other->ob_itself ) return 1; + if ( self->ob_itself < other->ob_itself ) return -1; + return 0; +} #define WinObj_repr NULL -#define WinObj_hash NULL +static int WinObj_hash(self) + WindowObject *self; +{ + return (int)self->ob_itself; +} PyTypeObject Window_Type = { PyObject_HEAD_INIT(&PyType_Type) |