mirror of
https://github.com/python/cpython.git
synced 2025-11-18 18:31:56 +00:00
Oops, repr didn't allocate the memory it used...
This commit is contained in:
parent
8a38714ba0
commit
3f49e4d064
2 changed files with 19 additions and 1 deletions
|
|
@ -2310,7 +2310,13 @@ static int WinObj_compare(self, other)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#define WinObj_repr NULL
|
||||
static PyObject * WinObj_repr(self)
|
||||
WindowObject *self;
|
||||
{
|
||||
char buf[100];
|
||||
sprintf(buf, "<Window object at 0x%08.8x for 0x%08.8x>", self, self->ob_itself);
|
||||
return PyString_FromString(buf);
|
||||
}
|
||||
|
||||
static int WinObj_hash(self)
|
||||
WindowObject *self;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue