summaryrefslogtreecommitdiffstats
path: root/Mac/Modules
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-09-04 22:20:39 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2001-09-04 22:20:39 (GMT)
commit1767f9360346cd7e312be20d49bd2538f5864910 (patch)
tree60cb4c98f2e7c69073cfa808a1ae135886cf667f /Mac/Modules
parent06d2e1af3579f6a698a84b81dfda0bacb6263f7d (diff)
downloadcpython-1767f9360346cd7e312be20d49bd2538f5864910.zip
cpython-1767f9360346cd7e312be20d49bd2538f5864910.tar.gz
cpython-1767f9360346cd7e312be20d49bd2538f5864910.tar.bz2
Added prototypes to silence gcc strict-prototype warnings.
Fixed a few missing return values.
Diffstat (limited to 'Mac/Modules')
-rw-r--r--Mac/Modules/Nav.c108
-rw-r--r--Mac/Modules/icgluemodule.c81
2 files changed, 48 insertions, 141 deletions
diff --git a/Mac/Modules/Nav.c b/Mac/Modules/Nav.c
index 9253cca..15cec8b 100644
--- a/Mac/Modules/Nav.c
+++ b/Mac/Modules/Nav.c
@@ -88,10 +88,10 @@ my_previewProc(NavCBRecPtr callBackParms,
PyObject *rv;
Boolean c_rv = false;
- if (!dict) return;
+ if (!dict) return false;
if ( (pyfunc = PyDict_GetItemString(dict, "previewProc")) == NULL ) {
PyErr_Clear();
- return;
+ return false;
}
rv = PyObject_CallFunction(pyfunc, "s#", (void *)callBackParms, sizeof(NavCBRec));
if ( rv ) {
@@ -114,10 +114,10 @@ my_filterProc(AEDesc *theItem, void *info,
PyObject *rv;
Boolean c_rv = false;
- if (!dict) return;
+ if (!dict) return false;
if ( (pyfunc = PyDict_GetItemString(dict, "filterProc")) == NULL ) {
PyErr_Clear();
- return;
+ return false;
}
rv = PyObject_CallFunction(pyfunc, "O&s#h",
AEDesc_New, theItem, info, sizeof(NavFileOrFolderInfo), (short)filterMode);
@@ -244,9 +244,7 @@ static char nav_NavTranslateFile__doc__[] =
;
static PyObject *
-nav_NavTranslateFile(self, args)
- navrrobject *self;
- PyObject *args;
+nav_NavTranslateFile(navrrobject *self, PyObject *args)
{
NavTranslationOptions howToTranslate;
OSErr err;
@@ -267,9 +265,7 @@ static char nav_NavCompleteSave__doc__[] =
;
static PyObject *
-nav_NavCompleteSave(self, args)
- navrrobject *self;
- PyObject *args;
+nav_NavCompleteSave(navrrobject *self, PyObject *args)
{
NavTranslationOptions howToTranslate;
OSErr err;
@@ -310,17 +306,14 @@ newnavrrobject(NavReplyRecord *itself)
static void
-navrr_dealloc(self)
- navrrobject *self;
+navrr_dealloc(navrrobject *self)
{
NavDisposeReply(&self->itself);
PyMem_DEL(self);
}
static PyObject *
-navrr_getattr(self, name)
- navrrobject *self;
- char *name;
+navrr_getattr(navrrobject *self, char *name)
{
FSSpec fss;
@@ -379,10 +372,7 @@ navrr_getattr(self, name)
}
static int
-navrr_setattr(self, name, v)
- navrrobject *self;
- char *name;
- PyObject *v;
+navrr_setattr(navrrobject *self, char *name, PyObject *v)
{
/* Set attribute 'name' to value 'v'. v==NULL means delete */
@@ -428,10 +418,7 @@ static char nav_NavGetFile__doc__[] =
;
static PyObject *
-nav_NavGetFile(self, args, kw)
- PyObject *self; /* Not used */
- PyObject *args;
- PyObject *kw;
+nav_NavGetFile(PyObject *self, PyObject *args, PyObject *kw)
{
PyObject *dict;
AEDesc *defaultLocation = NULL;
@@ -466,10 +453,7 @@ static char nav_NavPutFile__doc__[] =
;
static PyObject *
-nav_NavPutFile(self, args, kw)
- PyObject *self; /* Not used */
- PyObject *args;
- PyObject *kw;
+nav_NavPutFile(PyObject *self, PyObject *args, PyObject *kw)
{
PyObject *dict;
AEDesc *defaultLocation = NULL;
@@ -504,10 +488,7 @@ static char nav_NavAskSaveChanges__doc__[] =
;
static PyObject *
-nav_NavAskSaveChanges(self, args, kw)
- PyObject *self; /* Not used */
- PyObject *args;
- PyObject *kw;
+nav_NavAskSaveChanges(PyObject *self, PyObject *args, PyObject *kw)
{
PyObject *dict;
NavDialogOptions dialogOptions;
@@ -537,10 +518,7 @@ static char nav_NavCustomAskSaveChanges__doc__[] =
;
static PyObject *
-nav_NavCustomAskSaveChanges(self, args, kw)
- PyObject *self; /* Not used */
- PyObject *args;
- PyObject *kw;
+nav_NavCustomAskSaveChanges(PyObject *self, PyObject *args, PyObject *kw)
{
PyObject *dict;
NavDialogOptions dialogOptions;
@@ -569,10 +547,7 @@ static char nav_NavAskDiscardChanges__doc__[] =
;
static PyObject *
-nav_NavAskDiscardChanges(self, args, kw)
- PyObject *self; /* Not used */
- PyObject *args;
- PyObject *kw;
+nav_NavAskDiscardChanges(PyObject *self, PyObject *args, PyObject *kw)
{
PyObject *dict;
NavDialogOptions dialogOptions;
@@ -601,10 +576,7 @@ static char nav_NavChooseFile__doc__[] =
;
static PyObject *
-nav_NavChooseFile(self, args, kw)
- PyObject *self; /* Not used */
- PyObject *args;
- PyObject *kw;
+nav_NavChooseFile(PyObject *self, PyObject *args, PyObject *kw)
{
PyObject *dict;
AEDesc *defaultLocation = NULL;
@@ -639,10 +611,7 @@ static char nav_NavChooseFolder__doc__[] =
;
static PyObject *
-nav_NavChooseFolder(self, args, kw)
- PyObject *self; /* Not used */
- PyObject *args;
- PyObject *kw;
+nav_NavChooseFolder(PyObject *self, PyObject *args, PyObject *kw)
{
PyObject *dict;
AEDesc *defaultLocation = NULL;
@@ -675,10 +644,7 @@ static char nav_NavChooseVolume__doc__[] =
;
static PyObject *
-nav_NavChooseVolume(self, args, kw)
- PyObject *self; /* Not used */
- PyObject *args;
- PyObject *kw;
+nav_NavChooseVolume(PyObject *self, PyObject *args, PyObject *kw)
{
PyObject *dict;
AEDesc *defaultLocation = NULL;
@@ -711,10 +677,7 @@ static char nav_NavChooseObject__doc__[] =
;
static PyObject *
-nav_NavChooseObject(self, args, kw)
- PyObject *self; /* Not used */
- PyObject *args;
- PyObject *kw;
+nav_NavChooseObject(PyObject *self, PyObject *args, PyObject *kw)
{
PyObject *dict;
AEDesc *defaultLocation = NULL;
@@ -747,10 +710,7 @@ static char nav_NavNewFolder__doc__[] =
;
static PyObject *
-nav_NavNewFolder(self, args, kw)
- PyObject *self; /* Not used */
- PyObject *args;
- PyObject *kw;
+nav_NavNewFolder(PyObject *self, PyObject *args, PyObject *kw)
{
PyObject *dict;
AEDesc *defaultLocation = NULL;
@@ -784,9 +744,7 @@ static char nav_NavCustomControl__doc__[] =
static PyObject *
-nav_NavCustomControl(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+nav_NavCustomControl(PyObject *self, PyObject *args)
{
if (!PyArg_ParseTuple(args, ""))
@@ -801,9 +759,7 @@ static char nav_NavServicesCanRun__doc__[] =
;
static PyObject *
-nav_NavServicesCanRun(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+nav_NavServicesCanRun(PyObject *self, PyObject *args)
{
Boolean rv;
if (!PyArg_ParseTuple(args, ""))
@@ -817,9 +773,7 @@ static char nav_NavServicesAvailable__doc__[] =
;
static PyObject *
-nav_NavServicesAvailable(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+nav_NavServicesAvailable(PyObject *self, PyObject *args)
{
Boolean rv;
@@ -834,9 +788,7 @@ static char nav_NavLoad__doc__[] =
;
static PyObject *
-nav_NavLoad(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+nav_NavLoad(PyObject *self, PyObject *args)
{
if (!PyArg_ParseTuple(args, ""))
@@ -851,9 +803,7 @@ static char nav_NavUnload__doc__[] =
;
static PyObject *
-nav_NavUnload(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+nav_NavUnload(PyObject *self, PyObject *args)
{
if (!PyArg_ParseTuple(args, ""))
@@ -868,9 +818,7 @@ static char nav_NavLibraryVersion__doc__[] =
;
static PyObject *
-nav_NavLibraryVersion(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+nav_NavLibraryVersion(PyObject *self, PyObject *args)
{
UInt32 rv;
@@ -885,9 +833,7 @@ static char nav_NavGetDefaultDialogOptions__doc__[] =
;
static PyObject *
-nav_NavGetDefaultDialogOptions(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+nav_NavGetDefaultDialogOptions(PyObject *self, PyObject *args)
{
NavDialogOptions dialogOptions;
OSErr err;
@@ -949,7 +895,7 @@ static char Nav_module_documentation[] =
;
void
-initNav()
+initNav(void)
{
PyObject *m, *d;
diff --git a/Mac/Modules/icgluemodule.c b/Mac/Modules/icgluemodule.c
index bd616db..88e34b5 100644
--- a/Mac/Modules/icgluemodule.c
+++ b/Mac/Modules/icgluemodule.c
@@ -88,9 +88,7 @@ static char ici_ICFindConfigFile__doc__[] =
;
static PyObject *
-ici_ICFindConfigFile(self, args)
- iciobject *self;
- PyObject *args;
+ici_ICFindConfigFile(iciobject *self, PyObject *args)
{
ICError err;
@@ -108,9 +106,7 @@ static char ici_ICFindUserConfigFile__doc__[] =
;
static PyObject *
-ici_ICFindUserConfigFile(self, args)
- iciobject *self;
- PyObject *args;
+ici_ICFindUserConfigFile(iciobject *self, PyObject *args)
{
ICError err;
ICDirSpec where;
@@ -129,9 +125,7 @@ static char ici_ICChooseConfig__doc__[] =
;
static PyObject *
-ici_ICChooseConfig(self, args)
- iciobject *self;
- PyObject *args;
+ici_ICChooseConfig(iciobject *self, PyObject *args)
{
ICError err;
@@ -148,9 +142,7 @@ static char ici_ICChooseNewConfig__doc__[] =
;
static PyObject *
-ici_ICChooseNewConfig(self, args)
- iciobject *self;
- PyObject *args;
+ici_ICChooseNewConfig(iciobject *self, PyObject *args)
{
ICError err;
@@ -169,9 +161,7 @@ static char ici_ICGetSeed__doc__[] =
;
static PyObject *
-ici_ICGetSeed(self, args)
- iciobject *self;
- PyObject *args;
+ici_ICGetSeed(iciobject *self, PyObject *args)
{
ICError err;
long seed;
@@ -189,9 +179,7 @@ static char ici_ICBegin__doc__[] =
;
static PyObject *
-ici_ICBegin(self, args)
- iciobject *self;
- PyObject *args;
+ici_ICBegin(iciobject *self, PyObject *args)
{
ICError err;
int perm;
@@ -210,9 +198,7 @@ static char ici_ICFindPrefHandle__doc__[] =
;
static PyObject *
-ici_ICFindPrefHandle(self, args)
- iciobject *self;
- PyObject *args;
+ici_ICFindPrefHandle(iciobject *self, PyObject *args)
{
ICError err;
Str255 key;
@@ -232,9 +218,7 @@ static char ici_ICSetPref__doc__[] =
;
static PyObject *
-ici_ICSetPref(self, args)
- iciobject *self;
- PyObject *args;
+ici_ICSetPref(iciobject *self, PyObject *args)
{
ICError err;
Str255 key;
@@ -258,9 +242,7 @@ static char ici_ICCountPref__doc__[] =
;
static PyObject *
-ici_ICCountPref(self, args)
- iciobject *self;
- PyObject *args;
+ici_ICCountPref(iciobject *self, PyObject *args)
{
ICError err;
long count;
@@ -278,9 +260,7 @@ static char ici_ICGetIndPref__doc__[] =
;
static PyObject *
-ici_ICGetIndPref(self, args)
- iciobject *self;
- PyObject *args;
+ici_ICGetIndPref(iciobject *self, PyObject *args)
{
ICError err;
long num;
@@ -299,9 +279,7 @@ static char ici_ICDeletePref__doc__[] =
;
static PyObject *
-ici_ICDeletePref(self, args)
- iciobject *self;
- PyObject *args;
+ici_ICDeletePref(iciobject *self, PyObject *args)
{
ICError err;
Str255 key;
@@ -320,9 +298,7 @@ static char ici_ICEnd__doc__[] =
;
static PyObject *
-ici_ICEnd(self, args)
- iciobject *self;
- PyObject *args;
+ici_ICEnd(iciobject *self, PyObject *args)
{
ICError err;
@@ -340,9 +316,7 @@ static char ici_ICEditPreferences__doc__[] =
;
static PyObject *
-ici_ICEditPreferences(self, args)
- iciobject *self;
- PyObject *args;
+ici_ICEditPreferences(iciobject *self, PyObject *args)
{
ICError err;
Str255 key;
@@ -361,9 +335,7 @@ static char ici_ICParseURL__doc__[] =
;
static PyObject *
-ici_ICParseURL(self, args)
- iciobject *self;
- PyObject *args;
+ici_ICParseURL(iciobject *self, PyObject *args)
{
ICError err;
Str255 hint;
@@ -387,9 +359,7 @@ static char ici_ICLaunchURL__doc__[] =
;
static PyObject *
-ici_ICLaunchURL(self, args)
- iciobject *self;
- PyObject *args;
+ici_ICLaunchURL(iciobject *self, PyObject *args)
{
ICError err;
Str255 hint;
@@ -412,9 +382,7 @@ static char ici_ICMapFilename__doc__[] =
;
static PyObject *
-ici_ICMapFilename(self, args)
- iciobject *self;
- PyObject *args;
+ici_ICMapFilename(iciobject *self, PyObject *args)
{
ICError err;
Str255 filename;
@@ -442,9 +410,7 @@ static char ici_ICMapTypeCreator__doc__[] =
;
static PyObject *
-ici_ICMapTypeCreator(self, args)
- iciobject *self;
- PyObject *args;
+ici_ICMapTypeCreator(iciobject *self, PyObject *args)
{
ICError err;
OSType type, creator;
@@ -517,17 +483,14 @@ newiciobject(OSType creator)
static void
-ici_dealloc(self)
- iciobject *self;
+ici_dealloc(iciobject *self)
{
(void)ICStop(self->inst);
PyMem_DEL(self);
}
static PyObject *
-ici_getattr(self, name)
- iciobject *self;
- char *name;
+ici_getattr(iciobject *self, char *name)
{
return Py_FindMethod(ici_methods, (PyObject *)self, name);
}
@@ -570,9 +533,7 @@ static char ic_ICStart__doc__[] =
;
static PyObject *
-ic_ICStart(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+ic_ICStart(PyObject *self, PyObject *args)
{
OSType creator;
@@ -597,7 +558,7 @@ static char icglue_module_documentation[] =
;
void
-initicglue()
+initicglue(void)
{
PyObject *m, *d;