summaryrefslogtreecommitdiff
path: root/audio/py-ao/files
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@FreeBSD.org>2010-06-06 20:39:21 +0000
committerChristian Weisgerber <naddy@FreeBSD.org>2010-06-06 20:39:21 +0000
commitf613ac049d40272c3b27a76dbab7f6723f2a2ba2 (patch)
treee62b67c39f729f55f17b68f6438f9f1beeadd10c /audio/py-ao/files
parentUpdate to 2.30.2.0. (diff)
Bump PORTREVISION after libao update and handle API incompatibility.
Notes
Notes: svn path=/head/; revision=255956
Diffstat (limited to 'audio/py-ao/files')
-rw-r--r--audio/py-ao/files/patch-src_aomodule.c66
-rw-r--r--audio/py-ao/files/patch-src_aomodule.h10
2 files changed, 76 insertions, 0 deletions
diff --git a/audio/py-ao/files/patch-src_aomodule.c b/audio/py-ao/files/patch-src_aomodule.c
new file mode 100644
index 000000000000..b4d686943e39
--- /dev/null
+++ b/audio/py-ao/files/patch-src_aomodule.c
@@ -0,0 +1,66 @@
+--- src/aomodule.c.orig 2010-06-06 18:41:04.000000000 +0200
++++ src/aomodule.c 2010-06-06 18:45:01.000000000 +0200
+@@ -4,7 +4,7 @@
+ static ao_option *
+ dict_to_options(PyObject *dict)
+ {
+- int pos = 0;
++ Py_ssize_t pos = 0;
+ PyObject *key, *val;
+ ao_option *head = NULL;
+ int ret;
+@@ -71,7 +71,7 @@ parse_args(PyObject *args, PyObject *kwa
+
+ *overwrite = 0;
+
+- if(PyArg_ParseTupleAndKeywords(args, kwargs, "s|llllO!sl",
++ if(PyArg_ParseTupleAndKeywords(args, kwargs, "s|iiiiO!si",
+ (char **) driver_name_kwlist,
+ &driver_name,
+ &format->bits,
+@@ -84,7 +84,7 @@ parse_args(PyObject *args, PyObject *kwa
+ *driver_id = ao_driver_id(driver_name);
+ } else {
+ PyErr_Clear();
+- if(!(PyArg_ParseTupleAndKeywords(args, kwargs, "i|llllO!sl",
++ if(!(PyArg_ParseTupleAndKeywords(args, kwargs, "i|iiiiO!si",
+ (char **) driver_id_kwlist,
+ driver_id,
+ &format->bits,
+@@ -114,6 +114,7 @@ py_ao_new(PyObject *self, PyObject *args
+ ao_sample_format sample_format;
+ ao_Object *retobj;
+
++ memset(&sample_format, 0, sizeof(sample_format));
+ if (!parse_args(args, kwargs,
+ &sample_format, &py_options,
+ &filename, &driver_id, &overwrite))
+@@ -141,8 +142,9 @@ py_ao_new(PyObject *self, PyObject *args
+ return NULL;
+ }
+
+- retobj = (ao_Object *) PyObject_NEW(ao_Object, &ao_Type);
++ retobj = (ao_Object *) PyObject_New(ao_Object, &ao_Type);
+ retobj->dev = dev;
++ retobj->driver_id = driver_id;
+ return (PyObject *) retobj;
+ }
+
+@@ -150,7 +152,7 @@ static void
+ py_ao_dealloc(ao_Object *self)
+ {
+ ao_close(self->dev);
+- PyMem_DEL(self);
++ PyObject_Del(self);
+ }
+
+ static PyObject *
+@@ -184,7 +186,7 @@ py_ao_driver_info(PyObject *self, PyObje
+
+ /* It's a method */
+ ao_Object *ao_self = (ao_Object *) self;
+- info = ao_driver_info(ao_self->dev->driver_id);
++ info = ao_driver_info(ao_self->driver_id);
+
+ } else {
+
diff --git a/audio/py-ao/files/patch-src_aomodule.h b/audio/py-ao/files/patch-src_aomodule.h
new file mode 100644
index 000000000000..1309f423d2e8
--- /dev/null
+++ b/audio/py-ao/files/patch-src_aomodule.h
@@ -0,0 +1,10 @@
+--- src/aomodule.h.orig 2010-06-06 18:45:10.000000000 +0200
++++ src/aomodule.h 2010-06-06 18:45:25.000000000 +0200
+@@ -9,6 +9,7 @@
+ typedef struct {
+ PyObject_HEAD
+ ao_device *dev;
++ uint32_t driver_id;
+ } ao_Object;
+
+ static PyObject *Py_aoError;