summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/win/winsupport.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Modules/win/winsupport.py')
-rw-r--r--Mac/Modules/win/winsupport.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Mac/Modules/win/winsupport.py b/Mac/Modules/win/winsupport.py
index 5bb5bda..8a38b97 100644
--- a/Mac/Modules/win/winsupport.py
+++ b/Mac/Modules/win/winsupport.py
@@ -179,7 +179,7 @@ class MyObjectDefinition(GlobalObjectDefinition):
Output("static PyObject * %s_repr(%s *self)", self.prefix, self.objecttype)
OutLbrace()
Output("char buf[100];")
- Output("""sprintf(buf, "<Window object at 0x%%08.8x for 0x%%08.8x>", self, self->ob_itself);""")
+ Output("""sprintf(buf, "<Window object at 0x%%8.8x for 0x%%8.8x>", (unsigned)self, (unsigned)self->ob_itself);""")
Output("return PyString_FromString(buf);")
OutRbrace()
@@ -208,7 +208,8 @@ long ptr;
if ( !PyArg_ParseTuple(_args, "i", &ptr) )
return NULL;
-return WinObj_WhichWindow((WindowPtr)ptr);
+_res = WinObj_WhichWindow((WindowPtr)ptr);
+return _res;
"""
f = ManualGenerator("WhichWindow", whichwin_body)