]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
These are true PyCFunctions, after adding the second argument to oss_self, no need...
authorGeorg Brandl <georg@python.org>
Sun, 24 Oct 2010 20:47:32 +0000 (20:47 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 24 Oct 2010 20:47:32 +0000 (20:47 +0000)
Modules/ossaudiodev.c

index 0a70c202faaee295cb99f989f0c3dc5e69ff9095..e660e50d0c1e73f9a87d1cd225e090a8305b1ffc 100644 (file)
@@ -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 },