updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / pyao / pyao-0.82-gentoo.diff
blob7a77d0ab8a2ebdfd57efe9c61d2157843b82cc38
1 http://bugs.gentoo.org/314627
2 http://bugs.gentoo.org/257550
4 --- src/aomodule.c
5 +++ src/aomodule.c
6 @@ -4,7 +4,7 @@
7 static ao_option *
8 dict_to_options(PyObject *dict)
10 - int pos = 0;
11 + Py_ssize_t pos = 0;
12 PyObject *key, *val;
13 ao_option *head = NULL;
14 int ret;
15 @@ -71,7 +71,7 @@
17 *overwrite = 0;
19 - if(PyArg_ParseTupleAndKeywords(args, kwargs, "s|llllO!sl",
20 + if(PyArg_ParseTupleAndKeywords(args, kwargs, "s|iiiiO!si",
21 (char **) driver_name_kwlist,
22 &driver_name,
23 &format->bits,
24 @@ -84,7 +84,7 @@
25 *driver_id = ao_driver_id(driver_name);
26 } else {
27 PyErr_Clear();
28 - if(!(PyArg_ParseTupleAndKeywords(args, kwargs, "i|llllO!sl",
29 + if(!(PyArg_ParseTupleAndKeywords(args, kwargs, "i|iiiiO!si",
30 (char **) driver_id_kwlist,
31 driver_id,
32 &format->bits,
33 @@ -141,8 +141,9 @@
34 return NULL;
37 - retobj = (ao_Object *) PyObject_NEW(ao_Object, &ao_Type);
38 + retobj = (ao_Object *) PyObject_New(ao_Object, &ao_Type);
39 retobj->dev = dev;
40 + retobj->driver_id = driver_id;
41 return (PyObject *) retobj;
44 @@ -150,7 +151,7 @@
45 py_ao_dealloc(ao_Object *self)
47 ao_close(self->dev);
48 - PyMem_DEL(self);
49 + PyObject_Del(self);
52 static PyObject *
53 @@ -184,7 +185,7 @@
55 /* It's a method */
56 ao_Object *ao_self = (ao_Object *) self;
57 - info = ao_driver_info(ao_self->dev->driver_id);
58 + info = ao_driver_info(ao_self->driver_id);
60 } else {
62 --- src/aomodule.h
63 +++ src/aomodule.h
64 @@ -9,6 +9,7 @@
65 typedef struct {
66 PyObject_HEAD
67 ao_device *dev;
68 + uint32_t driver_id;
69 } ao_Object;
71 static PyObject *Py_aoError;