diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2002-12-23 22:35:38 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2002-12-23 22:35:38 (GMT) |
commit | 234d0744466c17edb4440c766f02f6a6c955235b (patch) | |
tree | 2cc5e66ecedde4d5f2289aaf90c2f2a84281e58d /Mac/Modules/cf/cfsupport.py | |
parent | 15721c5c45496a2a9114eeddcce98c474a78b4f8 (diff) | |
download | cpython-234d0744466c17edb4440c766f02f6a6c955235b.zip cpython-234d0744466c17edb4440c766f02f6a6c955235b.tar.gz cpython-234d0744466c17edb4440c766f02f6a6c955235b.tar.bz2 |
- Various tweaks to forestall compiler warnings.
Diffstat (limited to 'Mac/Modules/cf/cfsupport.py')
-rw-r--r-- | Mac/Modules/cf/cfsupport.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Mac/Modules/cf/cfsupport.py b/Mac/Modules/cf/cfsupport.py index 8aed6c2..973c4d4 100644 --- a/Mac/Modules/cf/cfsupport.py +++ b/Mac/Modules/cf/cfsupport.py @@ -261,7 +261,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%%8.8x for 0x%%8.8x>", CFGetTypeID(self->ob_itself), (unsigned)self, (unsigned)self->ob_itself);""") + Output("""sprintf(buf, "<CFTypeRef type-%%d object at 0x%%8.8x for 0x%%8.8x>", (int)CFGetTypeID(self->ob_itself), (unsigned)self, (unsigned)self->ob_itself);""") Output("return PyString_FromString(buf);") OutRbrace() @@ -558,7 +558,8 @@ CFTypeRef_object.add(f) # Convert CF objects to Python objects toPython_body = """ -return PyCF_CF2Python(_self->ob_itself); +_res = PyCF_CF2Python(_self->ob_itself); +return _res; """ f = ManualGenerator("toPython", toPython_body); @@ -582,7 +583,8 @@ if (typeid == CFDictionaryGetTypeID()) if (typeid == CFURLGetTypeID()) return Py_BuildValue("O&", CFURLRefObj_New, rv); -return Py_BuildValue("O&", CFTypeRefObj_New, rv); +_res = Py_BuildValue("O&", CFTypeRefObj_New, rv); +return _res; """ f = ManualGenerator("toCF", toCF_body); f.docstring = lambda: "(python_object) -> (CF_object)" |