Advertisement
Guest User

Untitled

a guest
Aug 30th, 2010
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.64 KB | None | 0 0
  1. --- pyao-0.82.orig/src/aomodule.c
  2. +++ pyao-0.82/src/aomodule.c
  3. @@ -4,7 +4,7 @@
  4.  static ao_option *
  5.  dict_to_options(PyObject *dict)
  6.  {
  7. -  int pos = 0;
  8. +  Py_ssize_t pos = 0;
  9.    PyObject *key, *val;
  10.    ao_option *head = NULL;
  11.    int ret;
  12. @@ -71,7 +71,7 @@
  13.    
  14.    *overwrite = 0;
  15.  
  16. -  if(PyArg_ParseTupleAndKeywords(args, kwargs, "s|llllO!sl",
  17. +  if(PyArg_ParseTupleAndKeywords(args, kwargs, "s|iiiiO!si",
  18.                  (char **) driver_name_kwlist,
  19.                  &driver_name,
  20.                  &format->bits,
  21. @@ -84,7 +84,7 @@
  22.      *driver_id = ao_driver_id(driver_name);
  23.    } else {
  24.      PyErr_Clear();
  25. -    if(!(PyArg_ParseTupleAndKeywords(args, kwargs, "i|llllO!sl",
  26. +    if(!(PyArg_ParseTupleAndKeywords(args, kwargs, "i|iiiiO!si",
  27.                      (char **) driver_id_kwlist,
  28.                      driver_id,
  29.                      &format->bits,
  30. @@ -141,8 +141,9 @@
  31.      return NULL;
  32.    }
  33.  
  34. -  retobj = (ao_Object *) PyObject_NEW(ao_Object, &ao_Type);
  35. +  retobj = (ao_Object *) PyObject_New(ao_Object, &ao_Type);
  36.    retobj->dev = dev;
  37. +  retobj->driver_id = driver_id;
  38.    return (PyObject *) retobj;
  39.  }
  40.  
  41. @@ -150,7 +151,7 @@
  42.  py_ao_dealloc(ao_Object *self)
  43.  {
  44.    ao_close(self->dev);
  45. -  PyMem_DEL(self);
  46. +  PyObject_Del(self);
  47.  }
  48.  
  49.  static PyObject *
  50. @@ -184,7 +185,7 @@
  51.  
  52.      /* It's a method */
  53.      ao_Object *ao_self = (ao_Object *) self;
  54. -    info = ao_driver_info(ao_self->dev->driver_id);
  55. +    info = ao_driver_info(ao_self->driver_id);
  56.  
  57.    } else {
  58.  
  59. --- pyao-0.82.orig/src/aomodule.h
  60. +++ pyao-0.82/src/aomodule.h
  61. @@ -9,6 +9,7 @@
  62.  typedef struct {
  63.    PyObject_HEAD
  64.    ao_device *dev;
  65. +  uint32_t driver_id;
  66.  } ao_Object;
  67.  
  68.  static PyObject *Py_aoError;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement