]> granicus.if.org Git - python/commitdiff
Shut up a few more gcc warnings.
authorJack Jansen <jack.jansen@cwi.nl>
Tue, 4 Sep 2001 22:25:47 +0000 (22:25 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Tue, 4 Sep 2001 22:25:47 +0000 (22:25 +0000)
Mac/Modules/cf/_CFmodule.c
Mac/Modules/cf/cfsupport.py

index 24083bff0ba9b4e9c4774b30c265b0a1ecb0b888..124f9dc5052acc02ad56d3996c6f3549428cfe13 100644 (file)
@@ -272,7 +272,7 @@ static int CFTypeRefObj_compare(CFTypeRefObject *self, CFTypeRefObject *other)
 static PyObject * CFTypeRefObj_repr(CFTypeRefObject *self)
 {
        char buf[100];
-       sprintf(buf, "<CFTypeRef type-%d object at 0x%08.8x for 0x%08.8x>", CFGetTypeID(self->ob_itself), self, self->ob_itself);
+       sprintf(buf, "<CFTypeRef type-%d object at 0x%8.8x for 0x%8.8x>", CFGetTypeID(self->ob_itself), (unsigned long)self, (unsigned long)self->ob_itself);
        return PyString_FromString(buf);
 }
 
index f6fdaea3cf024dceb0005741974b19a27e26eae7..18361feae9438cc8f91cc9b5649f40fe86a7927e 100644 (file)
@@ -190,7 +190,7 @@ class MyGlobalObjectDefinition(GlobalObjectDefinition):
                Output("static PyObject * %s_repr(%s *self)", self.prefix, self.objecttype)
                OutLbrace()
                Output("char buf[100];")
-               Output("""sprintf(buf, "<CFTypeRef type-%%d object at 0x%%08.8x for 0x%%08.8x>", CFGetTypeID(self->ob_itself), self, self->ob_itself);""")
+               Output("""sprintf(buf, "<CFTypeRef type-%%d object at 0x%%8.8x for 0x%%8.8x>", CFGetTypeID(self->ob_itself), (unsigned long)self, (unsigned long)self->ob_itself);""")
                Output("return PyString_FromString(buf);")
                OutRbrace()