summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/snd
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2005-07-03 20:59:44 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2005-07-03 20:59:44 (GMT)
commit918a9e2f63a037de2a32e2b009944a0e5c693742 (patch)
tree951482c937428033e9ba8ce37bf6678503b3c163 /Mac/Modules/snd
parenta6af76cbe4e5b188ccdba0b628f9d75771c623c1 (diff)
downloadcpython-918a9e2f63a037de2a32e2b009944a0e5c693742.zip
cpython-918a9e2f63a037de2a32e2b009944a0e5c693742.tar.gz
cpython-918a9e2f63a037de2a32e2b009944a0e5c693742.tar.bz2
Updated (and regenerated) for name change in tp_init method arguments:
they are now _self, _args and _kwds.
Diffstat (limited to 'Mac/Modules/snd')
-rw-r--r--Mac/Modules/snd/_Sndmodule.c104
1 files changed, 52 insertions, 52 deletions
diff --git a/Mac/Modules/snd/_Sndmodule.c b/Mac/Modules/snd/_Sndmodule.c
index 581bf1e..fcaee5f 100644
--- a/Mac/Modules/snd/_Sndmodule.c
+++ b/Mac/Modules/snd/_Sndmodule.c
@@ -21,16 +21,16 @@
static int
SndCmd_Convert(PyObject *v, SndCommand *pc)
{
- int len;
- pc->param1 = 0;
- pc->param2 = 0;
- if (PyTuple_Check(v)) {
- if (PyArg_ParseTuple(v, "h|hl", &pc->cmd, &pc->param1, &pc->param2))
- return 1;
- PyErr_Clear();
- return PyArg_ParseTuple(v, "Hhs#", &pc->cmd, &pc->param1, &pc->param2, &len);
- }
- return PyArg_Parse(v, "H", &pc->cmd);
+ int len;
+ pc->param1 = 0;
+ pc->param2 = 0;
+ if (PyTuple_Check(v)) {
+ if (PyArg_ParseTuple(v, "h|hl", &pc->cmd, &pc->param1, &pc->param2))
+ return 1;
+ PyErr_Clear();
+ return PyArg_ParseTuple(v, "Hhs#", &pc->cmd, &pc->param1, &pc->param2, &len);
+ }
+ return PyArg_Parse(v, "H", &pc->cmd);
}
static pascal void SndCh_UserRoutine(SndChannelPtr chan, SndCommand *cmd); /* Forward */
@@ -352,9 +352,9 @@ static PyObject *SPBObj_get_error(SPBObject *self, void *closure)
static int SPBObj_set_completionRoutine(SPBObject *self, PyObject *v, void *closure)
{
self->ob_spb.completionRoutine = NewSICompletionUPP(SPB_completion);
- self->ob_completion = v;
- Py_INCREF(v);
- return 0;
+ self->ob_completion = v;
+ Py_INCREF(v);
+ return 0;
return 0;
}
@@ -1056,62 +1056,62 @@ static PyMethodDef Snd_methods[] = {
static int
SndCh_CallCallBack(void *arg)
{
- SndChannelObject *p = (SndChannelObject *)arg;
- PyObject *args;
- PyObject *res;
- args = Py_BuildValue("(O(hhl))",
- p, p->ob_cmd.cmd, p->ob_cmd.param1, p->ob_cmd.param2);
- res = PyEval_CallObject(p->ob_callback, args);
- Py_DECREF(args);
- if (res == NULL)
- return -1;
- Py_DECREF(res);
- return 0;
+ SndChannelObject *p = (SndChannelObject *)arg;
+ PyObject *args;
+ PyObject *res;
+ args = Py_BuildValue("(O(hhl))",
+ p, p->ob_cmd.cmd, p->ob_cmd.param1, p->ob_cmd.param2);
+ res = PyEval_CallObject(p->ob_callback, args);
+ Py_DECREF(args);
+ if (res == NULL)
+ return -1;
+ Py_DECREF(res);
+ return 0;
}
/* Routine passed to NewSndChannel -- schedule a call to SndCh_CallCallBack */
static pascal void
SndCh_UserRoutine(SndChannelPtr chan, SndCommand *cmd)
{
- SndChannelObject *p = (SndChannelObject *)(chan->userInfo);
- if (p->ob_callback != NULL) {
- long A5 = SetA5(p->ob_A5);
- p->ob_cmd = *cmd;
- Py_AddPendingCall(SndCh_CallCallBack, (void *)p);
- SetA5(A5);
- }
+ SndChannelObject *p = (SndChannelObject *)(chan->userInfo);
+ if (p->ob_callback != NULL) {
+ long A5 = SetA5(p->ob_A5);
+ p->ob_cmd = *cmd;
+ Py_AddPendingCall(SndCh_CallCallBack, (void *)p);
+ SetA5(A5);
+ }
}
/* SPB callbacks - Schedule callbacks to Python */
static int
SPB_CallCallBack(void *arg)
{
- SPBObject *p = (SPBObject *)arg;
- PyObject *args;
- PyObject *res;
-
- if ( p->ob_thiscallback == 0 ) return 0;
- args = Py_BuildValue("(O)", p);
- res = PyEval_CallObject(p->ob_thiscallback, args);
- p->ob_thiscallback = 0;
- Py_DECREF(args);
- if (res == NULL)
- return -1;
- Py_DECREF(res);
- return 0;
+ SPBObject *p = (SPBObject *)arg;
+ PyObject *args;
+ PyObject *res;
+
+ if ( p->ob_thiscallback == 0 ) return 0;
+ args = Py_BuildValue("(O)", p);
+ res = PyEval_CallObject(p->ob_thiscallback, args);
+ p->ob_thiscallback = 0;
+ Py_DECREF(args);
+ if (res == NULL)
+ return -1;
+ Py_DECREF(res);
+ return 0;
}
static pascal void
SPB_completion(SPBPtr my_spb)
{
- SPBObject *p = (SPBObject *)(my_spb->userLong);
-
- if (p && p->ob_completion) {
- long A5 = SetA5(p->ob_A5);
- p->ob_thiscallback = p->ob_completion; /* Hope we cannot get two at the same time */
- Py_AddPendingCall(SPB_CallCallBack, (void *)p);
- SetA5(A5);
- }
+ SPBObject *p = (SPBObject *)(my_spb->userLong);
+
+ if (p && p->ob_completion) {
+ long A5 = SetA5(p->ob_A5);
+ p->ob_thiscallback = p->ob_completion; /* Hope we cannot get two at the same time */
+ Py_AddPendingCall(SPB_CallCallBack, (void *)p);
+ SetA5(A5);
+ }
}