summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/qd
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Modules/qd')
-rw-r--r--Mac/Modules/qd/Qdmodule.c6
-rw-r--r--Mac/Modules/qd/qdsupport.py3
2 files changed, 6 insertions, 3 deletions
diff --git a/Mac/Modules/qd/Qdmodule.c b/Mac/Modules/qd/Qdmodule.c
index 88cddaf..af6a92e 100644
--- a/Mac/Modules/qd/Qdmodule.c
+++ b/Mac/Modules/qd/Qdmodule.c
@@ -40,9 +40,6 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern PyObject *BMObj_New(BitMapPtr);
extern int BMObj_Convert(PyObject *, BitMapPtr *);
-extern PyObject *PMObj_New(PixMapHandle);
-extern int PMObj_Convert(PyObject *, PixMapHandle *);
-
extern PyObject *WinObj_WhichWindow(WindowPtr);
#include <QuickDraw.h>
@@ -218,6 +215,9 @@ static PyObject *GrafObj_getattr(self, name)
if ( strcmp(name, "spExtra") == 0 )
return Py_BuildValue("O&", PyMac_BuildFixed, self->ob_itself->spExtra);
/* XXXX Add more, as needed */
+ /* This one is so we can compare grafports: */
+ if ( strcmp(name, "_id") == 0 )
+ return Py_BuildValue("l", (long)self->ob_itself);
}
return Py_FindMethodInChain(&GrafObj_chain, (PyObject *)self, name);
}
diff --git a/Mac/Modules/qd/qdsupport.py b/Mac/Modules/qd/qdsupport.py
index 203f8c0..61e7dd8 100644
--- a/Mac/Modules/qd/qdsupport.py
+++ b/Mac/Modules/qd/qdsupport.py
@@ -204,6 +204,9 @@ class MyGRObjectDefinition(GlobalObjectDefinition):
if ( strcmp(name, "spExtra") == 0 )
return Py_BuildValue("O&", PyMac_BuildFixed, self->ob_itself->spExtra);
/* XXXX Add more, as needed */
+ /* This one is so we can compare grafports: */
+ if ( strcmp(name, "_id") == 0 )
+ return Py_BuildValue("l", (long)self->ob_itself);
}""")
class MyBMObjectDefinition(GlobalObjectDefinition):