1 |
ssuominen 10/06/24 19:41:30 |
2 |
|
3 |
Added: pyao-0.82-new_api.patch |
4 |
Removed: pyao-fix-deallocation.patch |
5 |
Log: |
6 |
Fix building with libao >= 1.0.0 wrt #314627 by Juergen Rose. |
7 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-python/pyao/files/pyao-0.82-new_api.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/pyao/files/pyao-0.82-new_api.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/pyao/files/pyao-0.82-new_api.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: pyao-0.82-new_api.patch |
16 |
=================================================================== |
17 |
http://bugs.gentoo.org/314627 |
18 |
http://bugs.gentoo.org/257550 |
19 |
|
20 |
--- src/aomodule.c |
21 |
+++ src/aomodule.c |
22 |
@@ -4,7 +4,7 @@ |
23 |
static ao_option * |
24 |
dict_to_options(PyObject *dict) |
25 |
{ |
26 |
- int pos = 0; |
27 |
+ Py_ssize_t pos = 0; |
28 |
PyObject *key, *val; |
29 |
ao_option *head = NULL; |
30 |
int ret; |
31 |
@@ -71,7 +71,7 @@ |
32 |
|
33 |
*overwrite = 0; |
34 |
|
35 |
- if(PyArg_ParseTupleAndKeywords(args, kwargs, "s|llllO!sl", |
36 |
+ if(PyArg_ParseTupleAndKeywords(args, kwargs, "s|iiiiO!si", |
37 |
(char **) driver_name_kwlist, |
38 |
&driver_name, |
39 |
&format->bits, |
40 |
@@ -84,7 +84,7 @@ |
41 |
*driver_id = ao_driver_id(driver_name); |
42 |
} else { |
43 |
PyErr_Clear(); |
44 |
- if(!(PyArg_ParseTupleAndKeywords(args, kwargs, "i|llllO!sl", |
45 |
+ if(!(PyArg_ParseTupleAndKeywords(args, kwargs, "i|iiiiO!si", |
46 |
(char **) driver_id_kwlist, |
47 |
driver_id, |
48 |
&format->bits, |
49 |
@@ -141,8 +141,9 @@ |
50 |
return NULL; |
51 |
} |
52 |
|
53 |
- retobj = (ao_Object *) PyObject_NEW(ao_Object, &ao_Type); |
54 |
+ retobj = (ao_Object *) PyObject_New(ao_Object, &ao_Type); |
55 |
retobj->dev = dev; |
56 |
+ retobj->driver_id = driver_id; |
57 |
return (PyObject *) retobj; |
58 |
} |
59 |
|
60 |
@@ -150,7 +151,7 @@ |
61 |
py_ao_dealloc(ao_Object *self) |
62 |
{ |
63 |
ao_close(self->dev); |
64 |
- PyMem_DEL(self); |
65 |
+ PyObject_Del(self); |
66 |
} |
67 |
|
68 |
static PyObject * |
69 |
@@ -184,7 +185,7 @@ |
70 |
|
71 |
/* It's a method */ |
72 |
ao_Object *ao_self = (ao_Object *) self; |
73 |
- info = ao_driver_info(ao_self->dev->driver_id); |
74 |
+ info = ao_driver_info(ao_self->driver_id); |
75 |
|
76 |
} else { |
77 |
|
78 |
--- src/aomodule.h |
79 |
+++ src/aomodule.h |
80 |
@@ -9,6 +9,7 @@ |
81 |
typedef struct { |
82 |
PyObject_HEAD |
83 |
ao_device *dev; |
84 |
+ uint32_t driver_id; |
85 |
} ao_Object; |
86 |
|
87 |
static PyObject *Py_aoError; |