summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/waste
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/waste
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/waste')
-rw-r--r--Mac/Modules/waste/wastemodule.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/Mac/Modules/waste/wastemodule.c b/Mac/Modules/waste/wastemodule.c
index d09641f..2c28310 100644
--- a/Mac/Modules/waste/wastemodule.c
+++ b/Mac/Modules/waste/wastemodule.c
@@ -5,8 +5,20 @@
+#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 ) {\
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
+ }} while(0)
+
#include <WASTE.h>
#include <WEObjectHandlers.h>
@@ -213,7 +225,7 @@ PyObject *WEOObj_New(WEObjectReference itself)
it->ob_itself = itself;
return (PyObject *)it;
}
-WEOObj_Convert(PyObject *v, WEObjectReference *p_itself)
+int WEOObj_Convert(PyObject *v, WEObjectReference *p_itself)
{
if (!WEOObj_Check(v))
{
@@ -381,7 +393,7 @@ PyObject *wasteObj_New(WEReference itself)
WESetInfo(weRefCon, (void *)&it, itself);
return (PyObject *)it;
}
-wasteObj_Convert(PyObject *v, WEReference *p_itself)
+int wasteObj_Convert(PyObject *v, WEReference *p_itself)
{
if (!wasteObj_Check(v))
{
@@ -1061,7 +1073,6 @@ static PyObject *wasteObj_WEInsert(wasteObject *_self, PyObject *_args)
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
- pText__error__: ;
return _res;
}