Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9642eca

Browse files
committed
Shut up a few more gcc warnings.
1 parent 1767f93 commit 9642eca

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Mac/Modules/cf/_CFmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ static int CFTypeRefObj_compare(CFTypeRefObject *self, CFTypeRefObject *other)
272272
static PyObject * CFTypeRefObj_repr(CFTypeRefObject *self)
273273
{
274274
char buf[100];
275-
sprintf(buf, "<CFTypeRef type-%d object at 0x%08.8x for 0x%08.8x>", CFGetTypeID(self->ob_itself), self, self->ob_itself);
275+
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);
276276
return PyString_FromString(buf);
277277
}
278278

Mac/Modules/cf/cfsupport.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def outputRepr(self):
190190
Output("static PyObject * %s_repr(%s *self)", self.prefix, self.objecttype)
191191
OutLbrace()
192192
Output("char buf[100];")
193-
Output("""sprintf(buf, "<CFTypeRef type-%%d object at 0x%%08.8x for 0x%%08.8x>", CFGetTypeID(self->ob_itself), self, self->ob_itself);""")
193+
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);""")
194194
Output("return PyString_FromString(buf);")
195195
OutRbrace()
196196

0 commit comments

Comments
 (0)