diff options
author | Guido van Rossum <guido@python.org> | 1995-01-12 12:37:24 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-01-12 12:37:24 (GMT) |
commit | fffb8bb5260aaa77b0d148f714ccaf2f8f7a8cd0 (patch) | |
tree | bc8e838f6082d416b3544e3e31ed813558ece8be /Mac | |
parent | 9a22de101fd66c6e0d1a6dda515a7b31d8c9c9aa (diff) | |
download | cpython-fffb8bb5260aaa77b0d148f714ccaf2f8f7a8cd0.zip cpython-fffb8bb5260aaa77b0d148f714ccaf2f8f7a8cd0.tar.gz cpython-fffb8bb5260aaa77b0d148f714ccaf2f8f7a8cd0.tar.bz2 |
rename2 changes
Diffstat (limited to 'Mac')
-rw-r--r-- | Mac/Include/macglue.h | 6 | ||||
-rw-r--r-- | Mac/Modules/macosmodule.c | 22 | ||||
-rw-r--r-- | Mac/Python/macgetmtime.c | 1 | ||||
-rw-r--r-- | Mac/Python/macglue.c | 2 |
4 files changed, 15 insertions, 16 deletions
diff --git a/Mac/Include/macglue.h b/Mac/Include/macglue.h index 1f5d98d..d5be4fb 100644 --- a/Mac/Include/macglue.h +++ b/Mac/Include/macglue.h @@ -1,3 +1,3 @@ -char *macstrerror PROTO((int)); /* strerror with mac errors */ -object *PyErr_Mac PROTO((object *, int)); /* Exception with a mac error */ -int PyMac_Idle PROTO((void)); /* Idle routine */
\ No newline at end of file +char *macstrerror Py_PROTO((int)); /* strerror with mac errors */ +PyObject *PyErr_Mac Py_PROTO((PyObject *, int)); /* Exception with a mac error */ +int PyMac_Idle Py_PROTO((void)); /* Idle routine */ diff --git a/Mac/Modules/macosmodule.c b/Mac/Modules/macosmodule.c index 56b8241..597d654 100644 --- a/Mac/Modules/macosmodule.c +++ b/Mac/Modules/macosmodule.c @@ -27,8 +27,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "Python.h" #include "macglue.h" -#include <stdio.h> -#include <string.h> #include <errno.h> #include <OSUtils.h> /* for Set(Current)A5 */ @@ -78,7 +76,7 @@ GetStr255(PyObject *v, Str255 pbuf) /* Resource objects */ typedef struct { - OB_HEAD + PyObject_HEAD Handle h; } RsrcObject; @@ -226,8 +224,8 @@ MacOS_GetFileType(PyObject *self, PyObject *args) type = PyString_FromStringAndSize((char *)&info.fdType, 4); creator = PyString_FromStringAndSize((char *)&info.fdCreator, 4); res = Py_BuildValue("OO", type, creator); - DECREF(type); - DECREF(creator); + Py_DECREF(type); + Py_DECREF(creator); return res; } @@ -251,7 +249,7 @@ MacOS_SetFileType(PyObject *self, PyObject *args) info.fdCreator = creator; if ((err = SetFInfo(name, 0, &info)) != noErr) { errno = err; - err_errno(MacOS_Error); + PyErr_SetFromErrno(MacOS_Error); return NULL; } Py_INCREF(Py_None); @@ -278,7 +276,7 @@ GetSndCommand(PyObject *v, SndCommand *pc) } typedef struct { - OB_HEAD + PyObject_HEAD SndChannelPtr chan; } SndChObject; @@ -304,7 +302,7 @@ SndCh_Cleanup(SndChObject *s, int quitNow) s->chan = NULL; SndDisposeChannel(chan, quitNow); if (userInfo != 0) - DEL(userInfo); + PyMem_DEL(userInfo); } } @@ -436,7 +434,7 @@ MySafeCallback(arg) Py_DECREF(args); if (res == NULL) return -1; - DECREF(res); + Py_DECREF(res); return 0; } @@ -472,7 +470,7 @@ MacOS_SndNewChannel(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args, "h|lO", &synth, &init, &callback)) return NULL; if (callback != NULL) { - p = NEW(cbinfo, 1); + p = PyMem_NEW(cbinfo, 1); if (p == NULL) return PyErr_NoMemory(); p->A5 = SetCurrentA5(); @@ -483,13 +481,13 @@ MacOS_SndNewChannel(PyObject *self, PyObject *args) err = SndNewChannel(&chan, synth, init, userroutine); if (err) { if (p) - DEL(p); + PyMem_DEL(p); return PyErr_Mac(MacOS_Error, (int)err); } res = (PyObject *)SndCh_FromSndChannelPtr(chan); if (res == NULL) { SndDisposeChannel(chan, 1); - DEL(p); + PyMem_DEL(p); } else { chan->userInfo = (long)p; diff --git a/Mac/Python/macgetmtime.c b/Mac/Python/macgetmtime.c index d4d15be..aeb1e70 100644 --- a/Mac/Python/macgetmtime.c +++ b/Mac/Python/macgetmtime.c @@ -1,4 +1,5 @@ #include "macstat.h" +#include "rename2.h" /* Interfaced used by import.c */ diff --git a/Mac/Python/macglue.c b/Mac/Python/macglue.c index e5e224b..353c850 100644 --- a/Mac/Python/macglue.c +++ b/Mac/Python/macglue.c @@ -40,7 +40,7 @@ char *macstrerror(int err) /* Set a MAC-specific error from errno, and return NULL; return None if no error */ PyObject * -PyErr_Mac(object *eobj, int err) +PyErr_Mac(PyObject *eobj, int err) { char *msg; PyObject *v; |