summaryrefslogtreecommitdiffstats
path: root/Modules/ossaudiodev.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-09-28 22:42:28 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-09-28 22:42:28 (GMT)
commit639418812f11749f99d1160b26325bdfa3a26a6f (patch)
treeeb438b6f5e06b7a5144567ff5c95c190bf850cc1 /Modules/ossaudiodev.c
parentb9dcffb51e0075f70434febb6ea557cc4d22f5fd (diff)
downloadcpython-639418812f11749f99d1160b26325bdfa3a26a6f.zip
cpython-639418812f11749f99d1160b26325bdfa3a26a6f.tar.gz
cpython-639418812f11749f99d1160b26325bdfa3a26a6f.tar.bz2
Use the new Py_ARRAY_LENGTH macro
Diffstat (limited to 'Modules/ossaudiodev.c')
-rw-r--r--Modules/ossaudiodev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/ossaudiodev.c b/Modules/ossaudiodev.c
index 95a23b7..bcab9da 100644
--- a/Modules/ossaudiodev.c
+++ b/Modules/ossaudiodev.c
@@ -530,7 +530,7 @@ oss_self(PyObject *self, PyObject *unused)
return self;
}
-static PyObject *
+static PyObject *
oss_exit(PyObject *self, PyObject *unused)
{
PyObject *ret = PyObject_CallMethod(self, "close", NULL);
@@ -1061,8 +1061,8 @@ build_namelists (PyObject *module)
int num_controls;
int i;
- num_controls = sizeof(control_labels) / sizeof(control_labels[0]);
- assert(num_controls == sizeof(control_names) / sizeof(control_names[0]));
+ num_controls = Py_ARRAY_LENGTH(control_labels);
+ assert(num_controls == Py_ARRAY_LENGTH(control_names));
labels = PyList_New(num_controls);
names = PyList_New(num_controls);