diff options
Diffstat (limited to 'Mac/Modules')
-rw-r--r-- | Mac/Modules/cf/_CFmodule.c | 18 | ||||
-rw-r--r-- | Mac/Modules/file/_Filemodule.c | 9 | ||||
-rw-r--r-- | Mac/Modules/mlte/_Mltemodule.c | 17 |
3 files changed, 14 insertions, 30 deletions
diff --git a/Mac/Modules/cf/_CFmodule.c b/Mac/Modules/cf/_CFmodule.c index 5f934c2..3f4d4f2 100644 --- a/Mac/Modules/cf/_CFmodule.c +++ b/Mac/Modules/cf/_CFmodule.c @@ -524,7 +524,7 @@ static void CFArrayRefObj_dealloc(CFArrayRefObject *self) self->ob_freeit((CFTypeRef)self->ob_itself); self->ob_itself = NULL; } - self->ob_type->tp_base->tp_dealloc((PyObject *)self); + CFTypeRef_Type.tp_dealloc((PyObject *)self); } static PyObject *CFArrayRefObj_CFArrayCreateCopy(CFArrayRefObject *_self, PyObject *_args) @@ -735,7 +735,7 @@ static void CFMutableArrayRefObj_dealloc(CFMutableArrayRefObject *self) self->ob_freeit((CFTypeRef)self->ob_itself); self->ob_itself = NULL; } - self->ob_type->tp_base->tp_dealloc((PyObject *)self); + CFArrayRef_Type.tp_dealloc((PyObject *)self); } static PyObject *CFMutableArrayRefObj_CFArrayRemoveValueAtIndex(CFMutableArrayRefObject *_self, PyObject *_args) @@ -975,7 +975,7 @@ static void CFDictionaryRefObj_dealloc(CFDictionaryRefObject *self) self->ob_freeit((CFTypeRef)self->ob_itself); self->ob_itself = NULL; } - self->ob_type->tp_base->tp_dealloc((PyObject *)self); + CFTypeRef_Type.tp_dealloc((PyObject *)self); } static PyObject *CFDictionaryRefObj_CFDictionaryCreateCopy(CFDictionaryRefObject *_self, PyObject *_args) @@ -1168,7 +1168,7 @@ static void CFMutableDictionaryRefObj_dealloc(CFMutableDictionaryRefObject *self self->ob_freeit((CFTypeRef)self->ob_itself); self->ob_itself = NULL; } - self->ob_type->tp_base->tp_dealloc((PyObject *)self); + CFDictionaryRef_Type.tp_dealloc((PyObject *)self); } static PyObject *CFMutableDictionaryRefObj_CFDictionaryRemoveAllValues(CFMutableDictionaryRefObject *_self, PyObject *_args) @@ -1351,7 +1351,7 @@ static void CFDataRefObj_dealloc(CFDataRefObject *self) self->ob_freeit((CFTypeRef)self->ob_itself); self->ob_itself = NULL; } - self->ob_type->tp_base->tp_dealloc((PyObject *)self); + CFTypeRef_Type.tp_dealloc((PyObject *)self); } static PyObject *CFDataRefObj_CFDataCreateCopy(CFDataRefObject *_self, PyObject *_args) @@ -1576,7 +1576,7 @@ static void CFMutableDataRefObj_dealloc(CFMutableDataRefObject *self) self->ob_freeit((CFTypeRef)self->ob_itself); self->ob_itself = NULL; } - self->ob_type->tp_base->tp_dealloc((PyObject *)self); + CFDataRef_Type.tp_dealloc((PyObject *)self); } static PyObject *CFMutableDataRefObj_CFDataSetLength(CFMutableDataRefObject *_self, PyObject *_args) @@ -1856,7 +1856,7 @@ static void CFStringRefObj_dealloc(CFStringRefObject *self) self->ob_freeit((CFTypeRef)self->ob_itself); self->ob_itself = NULL; } - self->ob_type->tp_base->tp_dealloc((PyObject *)self); + CFTypeRef_Type.tp_dealloc((PyObject *)self); } static PyObject *CFStringRefObj_CFStringCreateWithSubstring(CFStringRefObject *_self, PyObject *_args) @@ -2583,7 +2583,7 @@ static void CFMutableStringRefObj_dealloc(CFMutableStringRefObject *self) self->ob_freeit((CFTypeRef)self->ob_itself); self->ob_itself = NULL; } - self->ob_type->tp_base->tp_dealloc((PyObject *)self); + CFStringRef_Type.tp_dealloc((PyObject *)self); } static PyObject *CFMutableStringRefObj_CFStringAppend(CFMutableStringRefObject *_self, PyObject *_args) @@ -2971,7 +2971,7 @@ static void CFURLRefObj_dealloc(CFURLRefObject *self) self->ob_freeit((CFTypeRef)self->ob_itself); self->ob_itself = NULL; } - self->ob_type->tp_base->tp_dealloc((PyObject *)self); + CFTypeRef_Type.tp_dealloc((PyObject *)self); } static PyObject *CFURLRefObj_CFURLCreateData(CFURLRefObject *_self, PyObject *_args) diff --git a/Mac/Modules/file/_Filemodule.c b/Mac/Modules/file/_Filemodule.c index 81f0c02..c211de1 100644 --- a/Mac/Modules/file/_Filemodule.c +++ b/Mac/Modules/file/_Filemodule.c @@ -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; } diff --git a/Mac/Modules/mlte/_Mltemodule.c b/Mac/Modules/mlte/_Mltemodule.c index 64ceaf6..a79b257 100644 --- a/Mac/Modules/mlte/_Mltemodule.c +++ b/Mac/Modules/mlte/_Mltemodule.c @@ -49,23 +49,6 @@ OptFSSpecPtr_Convert(PyObject *v, FSSpec **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 */ static int |