summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2010-06-24 19:41:30 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2010-06-24 19:41:30 +0000
commita35c5355d16ed5b7a2d151d848c86f57a92950e7 (patch)
tree4f67d079f60d538bdcc0e7dc360f291d747f2080 /dev-python/pyao/files
parentAdded gmt mirros, #279262 (diff)
downloadgentoo-2-a35c5355d16ed5b7a2d151d848c86f57a92950e7.tar.gz
gentoo-2-a35c5355d16ed5b7a2d151d848c86f57a92950e7.tar.bz2
gentoo-2-a35c5355d16ed5b7a2d151d848c86f57a92950e7.zip
Fix building with libao >= 1.0.0 wrt #314627 by Juergen Rose.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/pyao/files')
-rw-r--r--dev-python/pyao/files/pyao-0.82-new_api.patch71
-rw-r--r--dev-python/pyao/files/pyao-fix-deallocation.patch12
2 files changed, 71 insertions, 12 deletions
diff --git a/dev-python/pyao/files/pyao-0.82-new_api.patch b/dev-python/pyao/files/pyao-0.82-new_api.patch
new file mode 100644
index 000000000000..7a77d0ab8a2e
--- /dev/null
+++ b/dev-python/pyao/files/pyao-0.82-new_api.patch
@@ -0,0 +1,71 @@
+http://bugs.gentoo.org/314627
+http://bugs.gentoo.org/257550
+
+--- src/aomodule.c
++++ src/aomodule.c
+@@ -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 @@
+
+ *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 @@
+ *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,
+@@ -141,8 +141,9 @@
+ 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 +151,7 @@
+ py_ao_dealloc(ao_Object *self)
+ {
+ ao_close(self->dev);
+- PyMem_DEL(self);
++ PyObject_Del(self);
+ }
+
+ static PyObject *
+@@ -184,7 +185,7 @@
+
+ /* 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 {
+
+--- src/aomodule.h
++++ src/aomodule.h
+@@ -9,6 +9,7 @@
+ typedef struct {
+ PyObject_HEAD
+ ao_device *dev;
++ uint32_t driver_id;
+ } ao_Object;
+
+ static PyObject *Py_aoError;
diff --git a/dev-python/pyao/files/pyao-fix-deallocation.patch b/dev-python/pyao/files/pyao-fix-deallocation.patch
deleted file mode 100644
index ae422272da82..000000000000
--- a/dev-python/pyao/files/pyao-fix-deallocation.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ru pyao-0.82/src/aomodule.c pyao-0.82.ok/src/aomodule.c
---- pyao-0.82/src/aomodule.c 2003-07-24 08:52:59.000000000 +0200
-+++ pyao-0.82.ok/src/aomodule.c 2009-02-04 03:22:17.000000000 +0100
-@@ -150,7 +150,7 @@
- py_ao_dealloc(ao_Object *self)
- {
- ao_close(self->dev);
-- PyMem_DEL(self);
-+ PyObject_FREE(self);
- }
-
- static PyObject *