[Python-checkins] python/dist/src/Modules ossaudiodev.c,1.18,1.19
gward@users.sourceforge.net
gward@users.sourceforge.net
Mon, 30 Dec 2002 19:07:24 -0800
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv1202
Modified Files:
ossaudiodev.c
Log Message:
Rename the parameter 'xp' in several methods to 'self', since that's
what it is.
Index: ossaudiodev.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/ossaudiodev.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** ossaudiodev.c 31 Dec 2002 03:04:52 -0000 1.18
--- ossaudiodev.c 31 Dec 2002 03:07:21 -0000 1.19
***************
*** 95,99 ****
newossobject(PyObject *arg)
{
! oss_audio_t *xp;
int fd, afmts, imode;
char *basedev = NULL;
--- 95,99 ----
newossobject(PyObject *arg)
{
! oss_audio_t *self;
int fd, afmts, imode;
char *basedev = NULL;
***************
*** 140,161 ****
}
/* Create and initialize the object */
! if ((xp = PyObject_New(oss_audio_t, &OSSAudioType)) == NULL) {
close(fd);
return NULL;
}
! xp->fd = fd;
! xp->mode = imode;
! xp->icount = xp->ocount = 0;
! xp->afmts = afmts;
! return xp;
}
static void
! oss_dealloc(oss_audio_t *xp)
{
/* if already closed, don't reclose it */
! if (xp->fd != -1)
! close(xp->fd);
! PyObject_Del(xp);
}
--- 140,161 ----
}
/* Create and initialize the object */
! if ((self = PyObject_New(oss_audio_t, &OSSAudioType)) == NULL) {
close(fd);
return NULL;
}
! self->fd = fd;
! self->mode = imode;
! self->icount = self->ocount = 0;
! self->afmts = afmts;
! return self;
}
static void
! oss_dealloc(oss_audio_t *self)
{
/* if already closed, don't reclose it */
! if (self->fd != -1)
! close(self->fd);
! PyObject_Del(self);
}
***************
*** 170,174 ****
char *basedev = NULL, *mode = NULL;
int fd, imode;
! oss_mixer_t *xp;
if (!PyArg_ParseTuple(arg, "|ss", &basedev, &mode)) {
--- 170,174 ----
char *basedev = NULL, *mode = NULL;
int fd, imode;
! oss_mixer_t *self;
if (!PyArg_ParseTuple(arg, "|ss", &basedev, &mode)) {
***************
*** 198,218 ****
}
! if ((xp = PyObject_New(oss_mixer_t, &OSSMixerType)) == NULL) {
close(fd);
return NULL;
}
! xp->fd = fd;
! return xp;
}
static void
! oss_mixer_dealloc(oss_mixer_t *xp)
{
/* if already closed, don't reclose it */
! if (xp->fd != -1)
! close(xp->fd);
! PyObject_Del(xp);
}
--- 198,218 ----
}
! if ((self = PyObject_New(oss_mixer_t, &OSSMixerType)) == NULL) {
close(fd);
return NULL;
}
! self->fd = fd;
! return self;
}
static void
! oss_mixer_dealloc(oss_mixer_t *self)
{
/* if already closed, don't reclose it */
! if (self->fd != -1)
! close(self->fd);
! PyObject_Del(self);
}
***************
*** 831,843 ****
static PyObject *
! oss_getattr(oss_audio_t *xp, char *name)
{
! return Py_FindMethod(oss_methods, (PyObject *)xp, name);
}
static PyObject *
! oss_mixer_getattr(oss_mixer_t *xp, char *name)
{
! return Py_FindMethod(oss_mixer_methods, (PyObject *)xp, name);
}
--- 831,843 ----
static PyObject *
! oss_getattr(oss_audio_t *self, char *name)
{
! return Py_FindMethod(oss_methods, (PyObject *)self, name);
}
static PyObject *
! oss_mixer_getattr(oss_mixer_t *self, char *name)
{
! return Py_FindMethod(oss_mixer_methods, (PyObject *)self, name);
}