summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/res
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-09-05 15:44:37 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2001-09-05 15:44:37 (GMT)
commit044d95e9f7e0c9d5840c623350df339526f037af (patch)
tree6dbb147886251621682b69a425ce094649027759 /Mac/Modules/res
parent28341ceb8f4f7f9b8edf5fbca9c9aa03e9606f08 (diff)
downloadcpython-044d95e9f7e0c9d5840c623350df339526f037af.zip
cpython-044d95e9f7e0c9d5840c623350df339526f037af.tar.gz
cpython-044d95e9f7e0c9d5840c623350df339526f037af.tar.bz2
A few more gcc warnings bite the dust.
Diffstat (limited to 'Mac/Modules/res')
-rw-r--r--Mac/Modules/res/_Resmodule.c9
-rw-r--r--Mac/Modules/res/resedit.py9
2 files changed, 12 insertions, 6 deletions
diff --git a/Mac/Modules/res/_Resmodule.c b/Mac/Modules/res/_Resmodule.c
index 775e668..8640f5a 100644
--- a/Mac/Modules/res/_Resmodule.c
+++ b/Mac/Modules/res/_Resmodule.c
@@ -440,7 +440,8 @@ static PyObject *ResObj_AutoDispose(ResourceObject *_self, PyObject *_args)
_self->ob_freeit = PyMac_AutoDisposeHandle;
else
_self->ob_freeit = NULL;
- return Py_BuildValue("i", old);
+ _res = Py_BuildValue("i", old);
+ return _res;
}
@@ -1378,7 +1379,8 @@ static PyObject *Res_Resource(PyObject *_self, PyObject *_args)
HLock(h);
memcpy(*h, buf, len);
HUnlock(h);
- return ResObj_New(h);
+ _res = ResObj_New(h);
+ return _res;
}
@@ -1403,7 +1405,8 @@ static PyObject *Res_Handle(PyObject *_self, PyObject *_args)
HUnlock(h);
rv = (ResourceObject *)ResObj_New(h);
rv->ob_freeit = PyMac_AutoDisposeHandle;
- return (PyObject *)rv;
+ _res = (PyObject *)rv;
+ return _res;
}
diff --git a/Mac/Modules/res/resedit.py b/Mac/Modules/res/resedit.py
index fce0bd1..c66c0c8 100644
--- a/Mac/Modules/res/resedit.py
+++ b/Mac/Modules/res/resedit.py
@@ -13,7 +13,8 @@ if ( h == NULL ) {
HLock(h);
memcpy(*h, buf, len);
HUnlock(h);
-return ResObj_New(h);
+_res = ResObj_New(h);
+return _res;
"""
f = ManualGenerator("Resource", resource_body)
@@ -43,7 +44,8 @@ memcpy(*h, buf, len);
HUnlock(h);
rv = (ResourceObject *)ResObj_New(h);
rv->ob_freeit = PyMac_AutoDisposeHandle;
-return (PyObject *)rv;
+_res = (PyObject *)rv;
+return _res;
"""
f = ManualGenerator("Handle", handle_body)
@@ -92,7 +94,8 @@ if ( onoff )
_self->ob_freeit = PyMac_AutoDisposeHandle;
else
_self->ob_freeit = NULL;
-return Py_BuildValue("i", old);
+_res = Py_BuildValue("i", old);
+return _res;
"""
f = ManualGenerator("AutoDispose", AutoDispose_body)
f.docstring = lambda: "(int)->int. Automatically DisposeHandle the object on Python object cleanup"