Retain the hex address of the object since there may be many objects of the

same type available in a program.
This commit is contained in:
Anthony Tuininga 2016-03-07 09:03:57 -07:00
parent 4125914447
commit 14bc5044e1

View File

@ -259,14 +259,14 @@ static PyObject *Object_Repr(
if (GetModuleAndName(Py_TYPE(self), &module, &name) < 0)
return NULL;
format = cxString_FromAscii("<%s.%s %s.%s>");
format = cxString_FromAscii("<%s.%s %s.%s at %#x>");
if (!format) {
Py_DECREF(module);
Py_DECREF(name);
return NULL;
}
formatArgs = PyTuple_Pack(4, module, name, self->objectType->schema,
self->objectType->name);
formatArgs = Py_BuildValue("(OOOOl)", module, name,
self->objectType->schema, self->objectType->name, self);
Py_DECREF(module);
Py_DECREF(name);
if (!formatArgs) {