summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/res
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-09-05 10:31:52 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2001-09-05 10:31:52 (GMT)
commitfd064863ebbe90adc24c60df4c3dbf630ec3a6c4 (patch)
tree60d77f56f209d3909b275d760bb4aedc9bd1d243 /Mac/Modules/res
parent5a1516bce5c9aa6f957f1e93ba85d143d8eac03a (diff)
downloadcpython-fd064863ebbe90adc24c60df4c3dbf630ec3a6c4.zip
cpython-fd064863ebbe90adc24c60df4c3dbf630ec3a6c4.tar.gz
cpython-fd064863ebbe90adc24c60df4c3dbf630ec3a6c4.tar.bz2
Shut up many more gcc warnings.
Diffstat (limited to 'Mac/Modules/res')
-rw-r--r--Mac/Modules/res/_Resmodule.c12
-rw-r--r--Mac/Modules/res/resedit.py3
-rw-r--r--Mac/Modules/res/ressupport.py2
3 files changed, 12 insertions, 5 deletions
diff --git a/Mac/Modules/res/_Resmodule.c b/Mac/Modules/res/_Resmodule.c
index 76d3bec..775e668 100644
--- a/Mac/Modules/res/_Resmodule.c
+++ b/Mac/Modules/res/_Resmodule.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 ) {\
@@ -394,7 +398,8 @@ static PyObject *ResObj_as_Control(ResourceObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
- return CtlObj_New((ControlHandle)_self->ob_itself);
+ _res = CtlObj_New((ControlHandle)_self->ob_itself);
+ return _res;
}
@@ -402,7 +407,8 @@ static PyObject *ResObj_as_Menu(ResourceObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
- return MenuObj_New((MenuHandle)_self->ob_itself);
+ _res = MenuObj_New((MenuHandle)_self->ob_itself);
+ return _res;
}
@@ -1533,7 +1539,7 @@ PyObject *OptResObj_New(Handle itself)
return ResObj_New(itself);
}
-OptResObj_Convert(PyObject *v, Handle *p_itself)
+int OptResObj_Convert(PyObject *v, Handle *p_itself)
{
PyObject *tmp;
diff --git a/Mac/Modules/res/resedit.py b/Mac/Modules/res/resedit.py
index 1684870..fce0bd1 100644
--- a/Mac/Modules/res/resedit.py
+++ b/Mac/Modules/res/resedit.py
@@ -58,7 +58,8 @@ functions.append(f)
# Convert resources to other things.
as_xxx_body = """
-return %sObj_New((%sHandle)_self->ob_itself);
+_res = %sObj_New((%sHandle)_self->ob_itself);
+return _res;
"""
def genresconverter(longname, shortname):
diff --git a/Mac/Modules/res/ressupport.py b/Mac/Modules/res/ressupport.py
index 2a72748..f7a1f45 100644
--- a/Mac/Modules/res/ressupport.py
+++ b/Mac/Modules/res/ressupport.py
@@ -61,7 +61,7 @@ PyObject *OptResObj_New(Handle itself)
return ResObj_New(itself);
}
-OptResObj_Convert(PyObject *v, Handle *p_itself)
+int OptResObj_Convert(PyObject *v, Handle *p_itself)
{
PyObject *tmp;