summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/carbonevt/CarbonEvtsupport.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Modules/carbonevt/CarbonEvtsupport.py')
-rw-r--r--Mac/Modules/carbonevt/CarbonEvtsupport.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Mac/Modules/carbonevt/CarbonEvtsupport.py b/Mac/Modules/carbonevt/CarbonEvtsupport.py
index cbaca2a..e3ac5f5 100644
--- a/Mac/Modules/carbonevt/CarbonEvtsupport.py
+++ b/Mac/Modules/carbonevt/CarbonEvtsupport.py
@@ -215,7 +215,7 @@ module = MacModule('_CarbonEvt', 'CarbonEvents', includestuff, finalstuff, inits
-class EventHandlerRefObjectDefinition(GlobalObjectDefinition):
+class EventHandlerRefObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
def outputStructMembers(self):
Output("%s ob_itself;", self.itselftype)
Output("PyObject *ob_callback;")
@@ -227,12 +227,15 @@ class EventHandlerRefObjectDefinition(GlobalObjectDefinition):
Output("RemoveEventHandler(self->ob_itself);")
Output("Py_DECREF(self->ob_callback);")
OutRbrace()
+
+class MyGlobalObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
+ pass
for typ in RefObjectTypes:
if typ == 'EventHandlerRef':
EventHandlerRefobject = EventHandlerRefObjectDefinition('EventHandlerRef')
else:
- execstr = typ + 'object = GlobalObjectDefinition(typ)'
+ execstr = typ + 'object = MyGlobalObjectDefinition(typ)'
exec execstr
module.addobject(eval(typ + 'object'))