diff options
author | Georg Brandl <georg@python.org> | 2010-10-24 20:47:32 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-10-24 20:47:32 (GMT) |
commit | 770a2be364706fdfde6a4d1282e32a4ddea76071 (patch) | |
tree | e9eb3b6f22917c96d5def24a37ac640ce88eed8c /Modules | |
parent | 09f24bb408dec8d965596b568bfe65d5b7b76a0a (diff) | |
download | cpython-770a2be364706fdfde6a4d1282e32a4ddea76071.zip cpython-770a2be364706fdfde6a4d1282e32a4ddea76071.tar.gz cpython-770a2be364706fdfde6a4d1282e32a4ddea76071.tar.bz2 |
These are true PyCFunctions, after adding the second argument to oss_self, no need to cast.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/ossaudiodev.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/ossaudiodev.c b/Modules/ossaudiodev.c index 0a70c20..e660e50 100644 --- a/Modules/ossaudiodev.c +++ b/Modules/ossaudiodev.c @@ -470,7 +470,7 @@ oss_close(oss_audio_t *self, PyObject *unused) } static PyObject * -oss_self(PyObject *self) +oss_self(PyObject *self, PyObject *unused) { Py_INCREF(self); return self; @@ -800,8 +800,8 @@ static PyMethodDef oss_methods[] = { { "flush", (PyCFunction)oss_sync, METH_VARARGS }, /* Support for the context manager protocol */ - { "__enter__", (PyCFunction)oss_self, METH_NOARGS }, - { "__exit__", (PyCFunction)oss_exit, METH_VARARGS }, + { "__enter__", oss_self, METH_NOARGS }, + { "__exit__", oss_exit, METH_VARARGS }, { NULL, NULL} /* sentinel */ }; @@ -812,8 +812,8 @@ static PyMethodDef oss_mixer_methods[] = { { "fileno", (PyCFunction)oss_mixer_fileno, METH_NOARGS }, /* Support for the context manager protocol */ - { "__enter__", (PyCFunction)oss_self, METH_NOARGS }, - { "__exit__", (PyCFunction)oss_exit, METH_VARARGS }, + { "__enter__", oss_self, METH_NOARGS }, + { "__exit__", oss_exit, METH_VARARGS }, /* Simple ioctl wrappers */ { "controls", (PyCFunction)oss_mixer_controls, METH_VARARGS }, |