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/qdoffs | |
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/qdoffs')
-rw-r--r-- | Mac/Modules/qdoffs/_Qdoffsmodule.c | 10 | ||||
-rw-r--r-- | Mac/Modules/qdoffs/qdoffssupport.py | 6 |
2 files changed, 12 insertions, 4 deletions
diff --git a/Mac/Modules/qdoffs/_Qdoffsmodule.c b/Mac/Modules/qdoffs/_Qdoffsmodule.c index 3d51259..f98e5d9 100644 --- a/Mac/Modules/qdoffs/_Qdoffsmodule.c +++ b/Mac/Modules/qdoffs/_Qdoffsmodule.c @@ -5,8 +5,12 @@ +#ifdef _WIN32 +#include "pywintoolbox.h" +#else #include "macglue.h" #include "pymactoolbox.h" +#endif /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ @@ -503,7 +507,8 @@ static PyObject *Qdoffs_GetPixMapBytes(PyObject *_self, PyObject *_args) if ( !PyArg_ParseTuple(_args, "O&ii", ResObj_Convert, &pm, &from, &length) ) return NULL; cp = GetPixBaseAddr(pm)+from; - return PyString_FromStringAndSize(cp, length); + _res = PyString_FromStringAndSize(cp, length); + return _res; } @@ -520,7 +525,8 @@ static PyObject *Qdoffs_PutPixMapBytes(PyObject *_self, PyObject *_args) cp = GetPixBaseAddr(pm)+from; memcpy(cp, icp, length); Py_INCREF(Py_None); - return Py_None; + _res = Py_None; + return _res; } diff --git a/Mac/Modules/qdoffs/qdoffssupport.py b/Mac/Modules/qdoffs/qdoffssupport.py index cee5f94..3e0337e 100644 --- a/Mac/Modules/qdoffs/qdoffssupport.py +++ b/Mac/Modules/qdoffs/qdoffssupport.py @@ -105,7 +105,8 @@ char *cp; if ( !PyArg_ParseTuple(_args, "O&ii", ResObj_Convert, &pm, &from, &length) ) return NULL; cp = GetPixBaseAddr(pm)+from; -return PyString_FromStringAndSize(cp, length); +_res = PyString_FromStringAndSize(cp, length); +return _res; """ f = ManualGenerator("GetPixMapBytes", pixmapgetbytes_body) f.docstring = lambda: """(pixmap, int start, int size) -> string. Return bytes from the pixmap""" @@ -122,7 +123,8 @@ if ( !PyArg_ParseTuple(_args, "O&is#", ResObj_Convert, &pm, &from, &icp, &length cp = GetPixBaseAddr(pm)+from; memcpy(cp, icp, length); Py_INCREF(Py_None); -return Py_None; +_res = Py_None; +return _res; """ f = ManualGenerator("PutPixMapBytes", pixmapputbytes_body) f.docstring = lambda: """(pixmap, int start, string data). Store bytes into the pixmap""" |