pyao crashes on amd64

1 view
Skip to first unread message

philipp...@it-jocham.at

unread,
Oct 3, 2008, 2:51:43 PM10/3/08
to PyOgg

64 bit issue when parsing arguments.
The attached patch fixes the issue.

--- pyao-0.82.orig/src/aomodule.c 2003-07-24 08:52:59.000000000
+0200
+++ pyao-0.82/src/aomodule.c 2008-07-29 22:17:45.000000000 +0200
@@ -5,5 +5,5 @@
dict_to_options(PyObject *dict)
{
- int pos = 0;
+ Py_ssize_t pos = 0;
PyObject *key, *val;
ao_option *head = NULL;
@@ -72,5 +72,5 @@
*overwrite = 0;

- if(PyArg_ParseTupleAndKeywords(args, kwargs, "s|llllO!sl",
+ if(PyArg_ParseTupleAndKeywords(args, kwargs, "s|iiiiO!si",
(char **) driver_name_kwlist,
&driver_name,
@@ -85,5 +85,5 @@
} 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,
@@ -142,5 +142,5 @@
}

- retobj = (ao_Object *) PyObject_NEW(ao_Object, &ao_Type);
+ retobj = (ao_Object *) PyObject_New(ao_Object, &ao_Type);
retobj->dev = dev;
return (PyObject *) retobj;
@@ -151,5 +151,5 @@
{
ao_close(self->dev);
- PyMem_DEL(self);
+ PyObject_Del(self);
}
Reply all
Reply to author
Forward
0 new messages