Kaydet (Commit) 82d4cc27 authored tarafından Neal Norwitz's avatar Neal Norwitz

Fix some warnings on Mac OS X 10.4

üst dd28d1c6
...@@ -105,13 +105,14 @@ _PyMac_GetFullPathname(FSSpec *fss, char *path, int len) ...@@ -105,13 +105,14 @@ _PyMac_GetFullPathname(FSSpec *fss, char *path, int len)
FSSpec fss2; FSSpec fss2;
int tocopy; int tocopy;
err = FSMakeFSSpec(fss->vRefNum, fss->parID, "", &fss2); err = FSMakeFSSpec(fss->vRefNum, fss->parID,
(unsigned char*)"", &fss2);
if (err) if (err)
return err; return err;
err = FSpMakeFSRef(&fss2, &fsr); err = FSpMakeFSRef(&fss2, &fsr);
if (err) if (err)
return err; return err;
err = (OSErr)FSRefMakePath(&fsr, path, len-1); err = (OSErr)FSRefMakePath(&fsr, (unsigned char*)path, len-1);
if (err) if (err)
return err; return err;
/* This part is not 100% safe: we append the filename part, but /* This part is not 100% safe: we append the filename part, but
...@@ -123,12 +124,12 @@ _PyMac_GetFullPathname(FSSpec *fss, char *path, int len) ...@@ -123,12 +124,12 @@ _PyMac_GetFullPathname(FSSpec *fss, char *path, int len)
if ((strlen(path) + tocopy) >= len) if ((strlen(path) + tocopy) >= len)
tocopy = len - strlen(path) - 1; tocopy = len - strlen(path) - 1;
if (tocopy > 0) if (tocopy > 0)
strncat(path, fss->name+1, tocopy); strncat(path, (char*)fss->name+1, tocopy);
} }
else { else {
if (err) if (err)
return err; return err;
err = (OSErr)FSRefMakePath(&fsr, path, len); err = (OSErr)FSRefMakePath(&fsr, (unsigned char*)path, len);
if (err) if (err)
return err; return err;
} }
......
...@@ -48,23 +48,6 @@ OptFSSpecPtr_Convert(PyObject *v, FSSpec **p_itself) ...@@ -48,23 +48,6 @@ OptFSSpecPtr_Convert(PyObject *v, FSSpec **p_itself)
return PyMac_GetFSSpec(v, *p_itself); return PyMac_GetFSSpec(v, *p_itself);
} }
/*
** Parse an optional rect
*/
static int
OptRectPtr_Convert(PyObject *v, Rect **p_itself)
{
static Rect r;
if (v == Py_None)
{
*p_itself = NULL;
return 1;
}
*p_itself = &r;
return PyMac_GetRect(v, *p_itself);
}
/* /*
** Parse an optional GWorld ** Parse an optional GWorld
*/ */
......
...@@ -27,8 +27,12 @@ ...@@ -27,8 +27,12 @@
#include "sqlitecompat.h" #include "sqlitecompat.h"
/* used to decide wether to call PyInt_FromLong or PyLong_FromLongLong */ /* used to decide wether to call PyInt_FromLong or PyLong_FromLongLong */
#ifndef INT32_MIN
#define INT32_MIN (-2147483647 - 1) #define INT32_MIN (-2147483647 - 1)
#endif
#ifndef INT32_MAX
#define INT32_MAX 2147483647 #define INT32_MAX 2147483647
#endif
PyObject* cursor_iternext(Cursor *self); PyObject* cursor_iternext(Cursor *self);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment