diff options
Diffstat (limited to 'dev-python/pyao/files/pyao-0.82-new_api.patch')
-rw-r--r-- | dev-python/pyao/files/pyao-0.82-new_api.patch | 71 |
1 files changed, 71 insertions, 0 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 00000000000..7a77d0ab8a2 --- /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; |