diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2001-09-05 10:31:52 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2001-09-05 10:31:52 (GMT) |
commit | fd064863ebbe90adc24c60df4c3dbf630ec3a6c4 (patch) | |
tree | 60d77f56f209d3909b275d760bb4aedc9bd1d243 /Mac/Modules/qd/qdsupport.py | |
parent | 5a1516bce5c9aa6f957f1e93ba85d143d8eac03a (diff) | |
download | cpython-fd064863ebbe90adc24c60df4c3dbf630ec3a6c4.zip cpython-fd064863ebbe90adc24c60df4c3dbf630ec3a6c4.tar.gz cpython-fd064863ebbe90adc24c60df4c3dbf630ec3a6c4.tar.bz2 |
Shut up many more gcc warnings.
Diffstat (limited to 'Mac/Modules/qd/qdsupport.py')
-rw-r--r-- | Mac/Modules/qd/qdsupport.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Mac/Modules/qd/qdsupport.py b/Mac/Modules/qd/qdsupport.py index 5f7c5bc..9c177b6 100644 --- a/Mac/Modules/qd/qdsupport.py +++ b/Mac/Modules/qd/qdsupport.py @@ -24,7 +24,11 @@ from macsupport import * class TextThingieClass(FixedInputBufferType): def getargsCheck(self, name): - pass + Output("/* Fool compiler warnings */") + Output("%s__in_len__ = %s__in_len__;", name, name) + + def declareSize(self, name): + Output("int %s__in_len__;", name) TextThingie = TextThingieClass(None) @@ -566,7 +570,8 @@ char *cp; if ( !PyArg_ParseTuple(_args, "ii", &from, &length) ) return NULL; cp = _self->ob_itself->baseAddr+from; -return PyString_FromStringAndSize(cp, length); +_res = PyString_FromStringAndSize(cp, length); +return _res; """ f = ManualGenerator("getdata", getdata_body) f.docstring = lambda: """(int start, int size) -> string. Return bytes from the bitmap""" @@ -582,7 +587,8 @@ if ( !PyArg_ParseTuple(_args, "is#", &from, &icp, &length) ) cp = _self->ob_itself->baseAddr+from; memcpy(cp, icp, length); Py_INCREF(Py_None); -return Py_None; +_res = Py_None; +return _res; """ f = ManualGenerator("putdata", putdata_body) f.docstring = lambda: """(int start, string data). Store bytes into the bitmap""" |