update Wed May 19 18:37:00 PDT 2010
[pkgsrc.git] / audio / py-ao / patches / patch-aa
1 $NetBSD: patch-aa,v 1.1 2010/05/19 21:00:02 drochner Exp $
2
3 --- src/aomodule.c.orig 2003-07-24 06:52:59.000000000 +0000
4 +++ src/aomodule.c
5 @@ -64,6 +64,7 @@ parse_args(PyObject *args, PyObject *kwa
6    assert(overwrite != NULL);
7  
8    /* Set the default values */
9 +  memset(format, 0, sizeof(*format));
10    format->bits = 16;
11    format->rate = 44100;
12    format->channels = 2;
13 @@ -143,6 +144,7 @@ py_ao_new(PyObject *self, PyObject *args
14  
15    retobj = (ao_Object *) PyObject_NEW(ao_Object, &ao_Type);
16    retobj->dev = dev;
17 +  retobj->driver_id = driver_id;
18    return (PyObject *) retobj;
19  }
20  
21 @@ -150,7 +152,7 @@ static void
22  py_ao_dealloc(ao_Object *self)
23  {
24    ao_close(self->dev);
25 -  PyMem_DEL(self);
26 +  PyObject_DEL(self);
27  }
28  
29  static PyObject *
30 @@ -184,7 +186,7 @@ py_ao_driver_info(PyObject *self, PyObje
31  
32      /* It's a method */
33      ao_Object *ao_self = (ao_Object *) self;
34 -    info = ao_driver_info(ao_self->dev->driver_id);
35 +    info = ao_driver_info(ao_self->driver_id);
36  
37    } else {
38