gentoo/dev-python/pyao/files/pyao-0.82-new_api.patch
Robin H. Johnson 56bd759df1
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.

This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.

Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
2015-08-08 17:38:18 -07:00

72 lines
1.6 KiB
Diff

http://bugs.gentoo.org/314627
http://bugs.gentoo.org/257550
--- src/aomodule.c
+++ src/aomodule.c
@@ -4,7 +4,7 @@
static ao_option *
dict_to_options(PyObject *dict)
{
- int pos = 0;
+ Py_ssize_t pos = 0;
PyObject *key, *val;
ao_option *head = NULL;
int ret;
@@ -71,7 +71,7 @@
*overwrite = 0;
- if(PyArg_ParseTupleAndKeywords(args, kwargs, "s|llllO!sl",
+ if(PyArg_ParseTupleAndKeywords(args, kwargs, "s|iiiiO!si",
(char **) driver_name_kwlist,
&driver_name,
&format->bits,
@@ -84,7 +84,7 @@
*driver_id = ao_driver_id(driver_name);
} 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,
&format->bits,
@@ -141,8 +141,9 @@
return NULL;
}
- retobj = (ao_Object *) PyObject_NEW(ao_Object, &ao_Type);
+ retobj = (ao_Object *) PyObject_New(ao_Object, &ao_Type);
retobj->dev = dev;
+ retobj->driver_id = driver_id;
return (PyObject *) retobj;
}
@@ -150,7 +151,7 @@
py_ao_dealloc(ao_Object *self)
{
ao_close(self->dev);
- PyMem_DEL(self);
+ PyObject_Del(self);
}
static PyObject *
@@ -184,7 +185,7 @@
/* It's a method */
ao_Object *ao_self = (ao_Object *) self;
- info = ao_driver_info(ao_self->dev->driver_id);
+ info = ao_driver_info(ao_self->driver_id);
} else {
--- src/aomodule.h
+++ src/aomodule.h
@@ -9,6 +9,7 @@
typedef struct {
PyObject_HEAD
ao_device *dev;
+ uint32_t driver_id;
} ao_Object;
static PyObject *Py_aoError;