]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix some warnings on Mac OS X 10.4
authorNeal Norwitz <nnorwitz@gmail.com>
Fri, 28 Apr 2006 05:28:05 +0000 (05:28 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Fri, 28 Apr 2006 05:28:05 +0000 (05:28 +0000)
Mac/Modules/file/_Filemodule.c
Mac/Modules/mlte/_Mltemodule.c
Modules/_sqlite/cursor.c

index 81f0c02ee0cdd24efbbc4027ad1100d7680e1b71..c211de136fac789094c05dc8144ea4b512063eec 100644 (file)
@@ -105,13 +105,14 @@ _PyMac_GetFullPathname(FSSpec *fss, char *path, int len)
                FSSpec fss2;
                int tocopy;
 
-               err = FSMakeFSSpec(fss->vRefNum, fss->parID, "", &fss2);
+               err = FSMakeFSSpec(fss->vRefNum, fss->parID,
+                                  (unsigned char*)"", &fss2);
                if (err)
                        return err;
                err = FSpMakeFSRef(&fss2, &fsr);
                if (err)
                        return err;
-               err = (OSErr)FSRefMakePath(&fsr, path, len-1);
+               err = (OSErr)FSRefMakePath(&fsr, (unsigned char*)path, len-1);
                if (err)
                        return err;
                /* This part is not 100% safe: we append the filename part, but
@@ -123,12 +124,12 @@ _PyMac_GetFullPathname(FSSpec *fss, char *path, int len)
                if ((strlen(path) + tocopy) >= len)
                        tocopy = len - strlen(path) - 1;
                if (tocopy > 0)
-                       strncat(path, fss->name+1, tocopy);
+                       strncat(path, (char*)fss->name+1, tocopy);
        }
        else {
                if (err)
                        return err;
-               err = (OSErr)FSRefMakePath(&fsr, path, len);
+               err = (OSErr)FSRefMakePath(&fsr, (unsigned char*)path, len);
                if (err)
                        return err;
        }
index 64ceaf6f0d3651b2f68ca2654e9cd0262daa5ebd..a79b257d76570ac880b264b2606989df1dcb6513 100644 (file)
@@ -48,23 +48,6 @@ OptFSSpecPtr_Convert(PyObject *v, FSSpec **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
 */
index 8c724121d55375840cc48f6f313c247608e4a0b9..6ee8beaf90481c589eb1bde18348c2eda44fe2dc 100644 (file)
 #include "sqlitecompat.h"
 
 /* used to decide wether to call PyInt_FromLong or PyLong_FromLongLong */
+#ifndef INT32_MIN
 #define INT32_MIN (-2147483647 - 1)
+#endif
+#ifndef INT32_MAX
 #define INT32_MAX 2147483647
+#endif
 
 PyObject* cursor_iternext(Cursor *self);