--- pyvorbis-1.4.orig/debian/copyright +++ pyvorbis-1.4/debian/copyright @@ -0,0 +1,35 @@ +This package was debianized by Christopher L Cheney on +Sun, 18 Feb 2001 23:52:09 -0600. + +It was downloaded from http://www.andrewchatham.com/pyogg/ + +Upstream Author: + + Andrew Chatham + +Copyright: + + Copyright (c) 2000-2003 Andrew H. Chatham + +License: + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + +On Debian systems, the complete text of the GNU General Public License v2 can +be found in /usr/share/common-licenses/GPL-2 file. + +These files have different copyright notices: + +src/vcedit.{c,h}: + Copyright: + (c) 2000-2001 Michael Smith + License: + GNU Library General Public License, version 2 + +On Debian systems, the complete text of the GNU Library General Public +License version 2 can be found in /usr/share/common-licenses/LGPL-2 +file. + --- pyvorbis-1.4.orig/debian/pycompat +++ pyvorbis-1.4/debian/pycompat @@ -0,0 +1 @@ +2 --- pyvorbis-1.4.orig/debian/python-pyvorbis.docs +++ pyvorbis-1.4/debian/python-pyvorbis.docs @@ -0,0 +1 @@ +README --- pyvorbis-1.4.orig/debian/rules +++ pyvorbis-1.4/debian/rules @@ -0,0 +1,89 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +include /usr/share/dpatch/dpatch.make + +PYVERS:=$(shell pyversions -r) + +build: patch build-stamp build-debug-stamp +build-stamp: + dh_testdir + + set -e; \ + for py in $(PYVERS); do \ + $$py config_unix.py --prefix /usr; \ + $$py setup.py build; \ + done + + touch build-stamp + +build-debug-stamp: + dh_testdir + + set -e; \ + for py in $(PYVERS); do \ + $$py-dbg config_unix.py --prefix /usr; \ + $$py-dbg setup.py build; \ + done + + touch build-debug-stamp + +clean: unpatch + dh_testdir + dh_testroot + + -for py in $(PYVERS); do \ + $$py setup.py clean --all; \ + $$py-dbg setup.py clean --all; \ + done + + dh_clean build*-stamp Setup config.log + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + set -e; \ + for py in $(PYVERS); do \ + $$py setup.py install --root=debian/python-pyvorbis; \ + done + + for py in $(PYVERS); do \ + $$py-dbg setup.py install --root=$(CURDIR)/debian/python-pyvorbis-dbg; \ + done + find debian/python-*-dbg ! -type d ! -name '*.so' | xargs rm -f + find debian/python-*-dbg -depth -empty -exec rmdir {} \; + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installdocs + dh_installexamples + dh_installchangelogs ChangeLog + dh_pysupport + dh_link + dh_strip -ppython-pyvorbis --dbg-package=python-pyvorbis-dbg + rm -rf debian/python-pyvorbis-dbg/usr/share/doc/python-pyvorbis-dbg + ln -s python-pyvorbis debian/python-pyvorbis-dbg/usr/share/doc/python-pyvorbis-dbg + dh_compress -X.py + dh_fixperms + dh_makeshlibs -V + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- pyvorbis-1.4.orig/debian/compat +++ pyvorbis-1.4/debian/compat @@ -0,0 +1 @@ +5 --- pyvorbis-1.4.orig/debian/README.source +++ pyvorbis-1.4/debian/README.source @@ -0,0 +1,4 @@ +This package uses dpatch to handle patches against upstream source code; you +can find additional information about dpatch at + + /usr/share/doc/dpatch/ --- pyvorbis-1.4.orig/debian/control +++ pyvorbis-1.4/debian/control @@ -0,0 +1,34 @@ +Source: pyvorbis +Section: python +Priority: optional +Maintainer: Debian Python Modules Team +Uploaders: Sandro Tosi , Mike O'Connor +Build-Depends: debhelper (>= 5.0.37.2), python-all-dev (>= 2.3.5-11), dpatch, + python-all-dbg, python-support (>= 0.3), python-ogg-dbg (>= 1.3-1.1), + libvorbis-dev (>= 1.0.1) +Standards-Version: 3.8.1 +Homepage: http://ekyo.nerim.net/software/pyogg/index.html +Vcs-Svn: svn://svn.debian.org/python-modules/packages/pyvorbis/trunk/ +Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/pyvorbis/trunk/ + +Package: python-pyvorbis +Architecture: any +Depends: ${python:Depends}, python-ogg, ${shlibs:Depends} +Provides: ${python:Provides} +Suggests: python-pyvorbis-dbg +Description: Python interface to the Ogg Vorbis library + This module makes the libvorbis (Ogg Vorbis) functions available + in Python. With this module you can write Python applications + that use the ogg vorbis library. + +Package: python-pyvorbis-dbg +Priority: extra +Section: debug +Architecture: any +Depends: python-pyvorbis (= ${binary:Version}), python-dbg, python-ogg-dbg, ${shlibs:Depends} +Description: Python interface to the Ogg Vorbis library (debug extension) + This module makes the libvorbis (Ogg Vorbis) functions available + in Python. With this module you can write Python applications + that use the ogg vorbis library. + . + This package contains the extension built for the Python debug interpreter. --- pyvorbis-1.4.orig/debian/changelog +++ pyvorbis-1.4/debian/changelog @@ -0,0 +1,197 @@ +pyvorbis (1.4-2build2) natty; urgency=low + + * Rebuild to add support for python 2.7. + + -- Matthias Klose Fri, 03 Dec 2010 00:13:09 +0000 + +pyvorbis (1.4-2build1) lucid; urgency=low + + * Rebuild dropping the extension for python2.5. + + -- Matthias Klose Mon, 01 Feb 2010 22:05:59 +0000 + +pyvorbis (1.4-2) unstable; urgency=medium + + [ Sandro Tosi ] + * debian/control + - adjust section to 'debug' for -dbg package + + [ Luca Falavigna ] + * Urgency medium to fix RC bugs. + * debian/patches/03_double_free_fix: fix a redundant double free which + caused a crash while opening a file (Closes: #521559, #526651). + + -- Sandro Tosi Tue, 02 Jun 2009 20:20:23 +0200 + +pyvorbis (1.4-1) unstable; urgency=low + + * New upstream release + * Uploading to unstable, since Lenny has been released + * debian/control + - switch Vcs-Browser field to viewsvn + - updated my email address + - removed DM-Upload-Allowed flag + - bump Standards-Version to 3.8.1 (no changes needed) + * debian/rules + - merged 'rm' calls into 'dh_clean' one + + -- Sandro Tosi Fri, 27 Mar 2009 13:39:53 +0100 + +pyvorbis (1.3-3) experimental; urgency=low + + [ Sandro Tosi ] + * Adopting under the DPMT umbrella; Closes: #469385 + * debian/control + - added dpatch build-dep + - set DPMT as maintainer + - set Mike and me as uploaders + - let short description be an appositive clause + - renamed depends on python-ogg to new packages names; thanks to Mathias + Brodala for the report; Closes: #487241 + - bump Standards-Version to 3.8.0 + - added Homepage field + - added Vcs-{Browser,Svn} fields + - added DM-Upload-Allowed field + * debian/rules + - added dpatch stuff + * debian/patches/01_previous_changes.dpatch + - added to remove direct upstream source code modification + * debian/README.source + - added (for Policy 3.8.0) + * debian/watch + - added + * debian/copyright + - separated copyright and license notices + - indented with 4 spaces + - taken the right part of GPLv2 licence text for license + - updated local license file location to point to GPL-2 + - added files under different copyright & licence + + [ Mike O'Connor ] + * debian/copyright + - refer to /usr/share/doc/common-licenses/LGPL-2 + * debian/control + - added missing comma to Build-Depends + + -- Mike O'Connor Sat, 06 Sep 2008 13:09:03 -0400 + +pyvorbis (1.3-2) unstable; urgency=low + + * QA upload + * Fix for memory handling. Closes: #469005 and others. + The enc2.py runs again. + * Set maintainer to QA group. + * Fix copyright, dependencies. + + -- Thomas Viehmann Fri, 07 Mar 2008 01:58:58 +0100 + +pyvorbis (1.3-1.4) unstable; urgency=low + + * NMU + * Build a python-pyvorbis-dbg package. + + -- Matthias Klose Fri, 01 Feb 2008 19:20:30 +0100 + +pyvorbis (1.3-1.3) unstable; urgency=low + + * NMU + * Merge from Ubuntu: + - Change section from interpreters to python. + - Fixes for python2.5 memory management. + + -- Matthias Klose Fri, 01 Feb 2008 19:10:57 +0100 + +pyvorbis (1.3-1.2) unstable; urgency=low + + * Non-maintainer upload. + * tighten depends, as it caused FTBFSes (we need to build against the + transitionned pyogg !). + + -- Pierre Habouzit Sat, 15 Jul 2006 21:11:54 +0200 + +pyvorbis (1.3-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Update package to the new python policy (Closes: #373371). + + -- Pierre Habouzit Fri, 30 Jun 2006 11:13:41 +0200 + +pyvorbis (1.3-1) unstable; urgency=low + + * Maintainer upload. + + -- Christopher L Cheney Fri, 12 Dec 2003 00:15:00 -0600 + +pyvorbis (1.3-0.1) unstable; urgency=low + + * NMU + * New upstream version. + - No more multiline strings (closes: #200989). + - VorbisComment doesn't segfault anymore (closes: #181312). + * Correct debian/copyright. + * Patch from warner@lothar.com to handle unicode comments + (closes: #199617). + * test/ogg123.py: play songs at correct speed when using ao output + (closes: #128029). + * Rebuild for python 2.3 (closes: #205108). + * Require debhelper 4.1.62. + * Standards-version is 3.6.0. + * Remove config.log in clean target. + + -- Josselin Mouette Wed, 13 Aug 2003 15:19:28 +0200 + +pyvorbis (1.0-1.3) unstable; urgency=low + + * Non Maintainer Upload + * Eliminate multiline strings (Closes: #197620) + + -- Matt Kraai Sat, 12 Jul 2003 17:23:54 +0200 + +pyvorbis (1.0-1.2) unstable; urgency=low + + * Non Maintainer Upload, with permission + * Rebuilt against latest libvorbis-dev. (Closes: #184821, #186184) + + -- Michael Banck Wed, 2 Apr 2003 17:59:23 +0200 + +pyvorbis (1.0-1.1) unstable; urgency=low + + * Non Maintainer Upload + * Switched to Python-2.2. (Closes: #161571) + + -- Michael Banck Tue, 3 Sep 2002 02:41:51 +0200 + +pyvorbis (1.0-1) unstable; urgency=low + + * New upstream. + + -- Christopher L Cheney Thu, 22 Aug 2002 16:00:00 -0500 + +pyvorbis (0.5-1) unstable; urgency=medium + + * Non Maintainer Upload, with permission + * New upstream. (Closes: #132617) + * Changed Build-Depends to python-pyogg (>> 0.5) + + -- Michael Banck Sat, 6 Apr 2002 15:12:54 +0200 + +pyvorbis (0.4-1) unstable; urgency=high + + * New upstream. (Closes: #103914, #108610) + * Updated package to be Debian Python Policy compliant. + + -- Christopher L Cheney Sun, 25 Nov 2001 23:54:18 -0600 + +pyvorbis (0.3-1) unstable; urgency=low + + * New upstream. + * Fixed versioned depends. + + -- Christopher L Cheney Sun, 17 Jun 2001 20:00:00 -0500 + +pyvorbis (0.2-1) unstable; urgency=low + + * Initial Release. + + -- Christopher L Cheney Mon, 26 Feb 2001 08:00:00 -0600 + --- pyvorbis-1.4.orig/debian/watch +++ pyvorbis-1.4/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://ekyo.nerim.net/software/pyogg/pyvorbis-(.*)\.tar\.gz --- pyvorbis-1.4.orig/debian/python-pyvorbis.examples +++ pyvorbis-1.4/debian/python-pyvorbis.examples @@ -0,0 +1,4 @@ +test/enc.py +test/enc2.py +test/ogg123.py +test/short.py --- pyvorbis-1.4.orig/debian/patches/02_whrandom_gone.dpatch +++ pyvorbis-1.4/debian/patches/02_whrandom_gone.dpatch @@ -0,0 +1,29 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_whrandom_gone.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: whrandom in python2.4 is deprecated, and in python2.5 is gone +## DP: this patch uses the 'random' module which is a drop-in replacement + +@DPATCH@ +diff -urNad pyvorbis-1.3~/test/ogg123.py pyvorbis-1.3/test/ogg123.py +--- pyvorbis-1.3~/test/ogg123.py 2008-09-06 12:57:12.000000000 -0400 ++++ pyvorbis-1.3/test/ogg123.py 2008-09-06 12:57:51.000000000 -0400 +@@ -17,7 +17,7 @@ + import string + import re + import os +-import whrandom ++import random + import time + + import ogg.vorbis +@@ -189,7 +189,7 @@ + verbose = 0 + + elif arg == '-z' or arg == '--shuffle': +- ri = whrandom.randrange ++ ri = random.randrange + for pos in range(len(args)): + newpos = ri(pos, len(args)) + tmp = args[pos] --- pyvorbis-1.4.orig/debian/patches/00list +++ pyvorbis-1.4/debian/patches/00list @@ -0,0 +1,3 @@ +01_previous_changes +02_whrandom_gone +03_double_free_fix --- pyvorbis-1.4.orig/debian/patches/03_double_free_fix.dpatch +++ pyvorbis-1.4/debian/patches/03_double_free_fix.dpatch @@ -0,0 +1,31 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 03_double_free_fix.dpatch by Luca Falavigna +## DP: Fix redundant double free. + +@DPATCH@ +diff -urNad pyvorbis-1.4~/src/pyvorbisfile.c pyvorbis-1.4/src/pyvorbisfile.c +--- pyvorbis-1.4~/src/pyvorbisfile.c 2009-06-01 13:00:44.000000000 +0000 ++++ pyvorbis-1.4/src/pyvorbisfile.c 2009-06-01 13:02:40.000000000 +0000 +@@ -173,8 +173,7 @@ + if (ret == NULL) { + PyObject_Del(newobj); + return NULL; +- } else +- Py_DECREF(ret); ++ } + + return (PyObject *) newobj; + } +@@ -190,11 +189,9 @@ + /* If file was opened from a file object, decref it, so it can + close */ + Py_DECREF(py_self->py_file); +- } else { +- /* Otherwise, we opened the file and should close it. */ +- fclose(py_self->c_file); + } + ++ free(py_self->ovf); + PyObject_Del(self); + } + --- pyvorbis-1.4.orig/debian/patches/01_previous_changes.dpatch +++ pyvorbis-1.4/debian/patches/01_previous_changes.dpatch @@ -0,0 +1,336 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_previous_changes.dpatch by Sandro Tosi +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: New patch generated from pyvorbis 1.3-3 diff.gz + +@DPATCH@ + +--- pyvorbis-1.3.orig/src/pyvorbiscodec.h ++++ pyvorbis-1.3/src/pyvorbiscodec.h +@@ -22,8 +22,8 @@ + extern PyTypeObject py_dsp_type; + extern PyTypeObject py_block_type; + +-PyObject *py_dsp_from_dsp(vorbis_dsp_state *vd, PyObject *parent); +-PyObject *py_block_from_block(vorbis_block *vb, PyObject *parent); ++PyObject *py_dsp_alloc(PyObject *parent); ++void py_dsp_dealloc(PyObject *self); + + #endif /* __VORBISCODEC_H__ */ + +--- pyvorbis-1.3.orig/src/pyvorbisfile.c ++++ pyvorbis-1.3/src/pyvorbisfile.c +@@ -167,7 +167,7 @@ + + ret = py_ov_open(newobj, args); + if (ret == NULL) { +- PyMem_DEL(newobj); ++ PyObject_Del(newobj); + return NULL; + } else + Py_DECREF(ret); +@@ -184,7 +184,7 @@ + /* If file was opened from a file object, decref it, so it can close */ + Py_XDECREF(((py_vorbisfile *) self)->py_file); + +- PyMem_DEL(self); ++ PyObject_Del(self); + } + + static PyObject * +--- pyvorbis-1.3.orig/src/pyvorbiscodec.c ++++ pyvorbis-1.3/src/pyvorbiscodec.c +@@ -29,7 +29,6 @@ + FDEF(dsp_close) "Signal that all audio data has been written to the object."; + FDEF(vorbis_bitrate_flushpacket) ""; + +-static void py_dsp_dealloc(PyObject *); + static PyObject *py_dsp_getattr(PyObject *, char*); + + char py_dsp_doc[] = ""; +@@ -82,14 +81,11 @@ + }; + + PyObject * +-py_dsp_from_dsp(vorbis_dsp_state *vd, PyObject *parent) ++py_dsp_alloc(PyObject *parent) + { +- py_dsp *ret = (py_dsp *) PyObject_NEW(py_dsp, &py_dsp_type); +- ++ py_dsp *ret = (py_dsp *) PyObject_New(py_dsp, &py_dsp_type); + if (ret == NULL) + return NULL; +- +- ret->vd = *vd; + ret->parent = parent; + Py_XINCREF(parent); + return (PyObject *) ret; +@@ -100,25 +96,23 @@ + { + py_vinfo* py_vi; + py_dsp *ret; +- vorbis_info *vi; +- vorbis_dsp_state vd; + + if (!PyArg_ParseTuple(args, "O!", &py_vinfo_type, &py_vi)) + return NULL; + +- ret = (py_dsp *) PyObject_NEW(py_dsp, &py_dsp_type); +- ret->parent = NULL; +- vi = &py_vi->vi; +- vorbis_synthesis_init(&vd, vi); +- return py_dsp_from_dsp(&vd, (PyObject *) py_vi); ++ ret = (py_dsp *) py_dsp_alloc((PyObject*) py_vi); ++ if (ret == NULL) ++ return NULL; ++ vorbis_synthesis_init(&ret->vd, &py_vi->vi); ++ return (PyObject *) ret; + } + +-static void ++void + py_dsp_dealloc(PyObject *self) + { + vorbis_dsp_clear(PY_DSP(self)); + Py_XDECREF(((py_dsp *)self)->parent); +- PyMem_DEL(self); ++ PyObject_Del(self); + } + + static PyObject* +@@ -127,21 +121,26 @@ + return Py_FindMethod(DSP_methods, self, name); + } + ++static void py_block_dealloc(PyObject *); ++PyObject * py_block_alloc(PyObject *parent); ++ + static PyObject * + py_vorbis_analysis_blockout(PyObject *self, PyObject *args) + { +- vorbis_block vb; +- int ret; + py_dsp *dsp_self = (py_dsp *) self; ++ py_block* py_vb; + + if (!PyArg_ParseTuple(args, "")) + return NULL; + +- vorbis_block_init(&dsp_self->vd, &vb); +- ret = vorbis_analysis_blockout(&dsp_self->vd, &vb); +- if (ret == 1) +- return py_block_from_block(&vb, self); ++ py_vb = (py_block*) py_block_alloc(self); ++ if (py_vb == NULL) ++ return NULL; ++ ++ if (vorbis_analysis_blockout(&dsp_self->vd, &py_vb->vb) == 1) ++ return (PyObject*) py_vb; + else { ++ py_block_dealloc((PyObject*) py_vb); + Py_INCREF(Py_None); + return Py_None; + } +@@ -207,16 +206,16 @@ + static PyObject * + py_vorbis_block_init(PyObject *self, PyObject *args) + { +- vorbis_block vb; +- py_dsp *dsp_self = (py_dsp *) self; +- PyObject *ret; ++ py_block *py_vb; + + if (!PyArg_ParseTuple(args, "")) + return NULL; + +- vorbis_block_init(&dsp_self->vd,&vb); +- ret = py_block_from_block(&vb, self); +- return ret; ++ py_vb = (py_block*) py_block_alloc(self); ++ if (py_vb == NULL) ++ return NULL; ++ ++ return (PyObject*) py_vb; + } + + /* Returns "len" if all arguments are strings of the same length, +@@ -397,7 +396,6 @@ + /********************************************************* + VorbisBlock + *********************************************************/ +-static void py_block_dealloc(PyObject *); + static PyObject *py_block_getattr(PyObject *, char*); + + FDEF(vorbis_analysis) "Output an OggPage."; +@@ -442,12 +440,25 @@ + {NULL, NULL} + }; + ++PyObject * ++py_block_alloc(PyObject *parent) ++{ ++ py_block *ret = (py_block *) PyObject_New(py_block, ++ &py_block_type); ++ if (ret == NULL) ++ return NULL; ++ vorbis_block_init(PY_DSP(parent), PY_BLOCK(ret)); ++ ret->parent = parent; ++ Py_XINCREF(parent); ++ return (PyObject *)ret; ++} ++ + static void + py_block_dealloc(PyObject *self) + { + vorbis_block_clear(PY_BLOCK(self)); + Py_XDECREF(((py_block *)self)->parent); +- PyMem_DEL(self); ++ PyObject_Del(self); + } + + static PyObject* +@@ -489,19 +500,3 @@ + return Py_None; + } + +-PyObject * +-py_block_from_block(vorbis_block *vb, PyObject *parent) +-{ +- py_block *ret = (py_block *) PyObject_NEW(py_block, +- &py_block_type); +- if (ret == NULL) +- return NULL; +- +- ret->vb = *vb; +- ret->parent = parent; +- Py_XINCREF(parent); +- return (PyObject *)ret; +-} +- +- +- +--- pyvorbis-1.3.orig/src/pyvorbisinfo.c ++++ pyvorbis-1.3/src/pyvorbisinfo.c +@@ -70,7 +70,7 @@ + py_info_new_from_vi(vorbis_info *vi) + { + py_vinfo *newobj; +- newobj = (py_vinfo *) PyObject_NEW(py_vinfo, ++ newobj = (py_vinfo *) PyObject_New(py_vinfo, + &py_vinfo_type); + newobj->vi = *vi; + return (PyObject *) newobj; +@@ -132,7 +132,7 @@ + static void + py_ov_info_dealloc(PyObject *self) + { +- PyMem_DEL(self); ++ PyObject_Del(self); + } + + #define CMP_RET(x) \ +@@ -188,19 +188,24 @@ + + static PyObject * + py_vorbis_analysis_init(PyObject *self, PyObject *args) ++// TV-FIXED + { + int res; +- +- py_vinfo *ovi_self = (py_vinfo *) self; +- vorbis_dsp_state vd; ++ py_dsp *ret; ++ py_vinfo *py_vi = (py_vinfo *) self; + + if (!PyArg_ParseTuple(args, "")) + return NULL; + +- if ((res = vorbis_analysis_init(&vd, &ovi_self->vi))) +- return v_error_from_code(res, "vorbis_analysis_init"); ++ ret = (py_dsp *) py_dsp_alloc((PyObject*) py_vi); ++ if (ret == NULL) ++ return NULL; + +- return py_dsp_from_dsp(&vd, self); ++ if ((res = vorbis_analysis_init(&ret->vd, &py_vi->vi))) { ++ py_dsp_dealloc((PyObject *) py_vi); ++ return v_error_from_code(res, "vorbis_analysis_init"); ++ } ++ return (PyObject*) ret; + } + + /* +@@ -323,7 +328,7 @@ + { + py_vcomment *newobj; + +- newobj = (py_vcomment *) PyObject_NEW(py_vcomment, ++ newobj = (py_vcomment *) PyObject_New(py_vcomment, + &py_vcomment_type); + newobj->vc = vc; + newobj->parent = parent; +@@ -336,7 +341,7 @@ + py_comment_new_empty(void) + { + py_vcomment *newobj; +- newobj = (py_vcomment *) PyObject_NEW(py_vcomment, ++ newobj = (py_vcomment *) PyObject_New(py_vcomment, + &py_vcomment_type); + if (!newobj) + return NULL; +@@ -381,7 +386,7 @@ + free(ovc_self->vc); + } + +- PyMem_DEL(self); ++ PyObject_Del(self); + } + + static PyObject* +@@ -848,7 +853,7 @@ + vcomment = create_comment_from_dict(dict); + if (!vcomment) + return NULL; +- pvc = (py_vcomment *) PyObject_NEW(py_vcomment, ++ pvc = (py_vcomment *) PyObject_New(py_vcomment, + &py_vcomment_type); + if (!pvc) { + vorbis_comment_clear(vcomment); +@@ -905,6 +910,7 @@ + #if PY_UNICODE + item = PyUnicode_DecodeUTF8(val, vallen, NULL); + if (!item) { ++ PyErr_Clear(); + /* To deal with non-UTF8 comments (against the standard) */ + item = PyString_FromStringAndSize(val, vallen); + } +--- pyvorbis-1.3.orig/test/ogg123.py ++++ pyvorbis-1.3/test/ogg123.py +@@ -165,9 +165,10 @@ + sys.exit(0) + + elif arg == '-d' or arg == '--device': ++ import ao + try: +- driver_id = ao_get_driver_id(val) +- except aoError: ++ driver_id = ao.driver_id(val) ++ except ao.aoError: + sys.stderr.write('No such device %s\n' % val) + sys.exit(1) + +@@ -199,7 +200,12 @@ + usage() + sys.exit(0) + +- myplayer = choices[modchoice]() # Either AOPlayer or LADPlayer ++ if modchoice == 'ao' and driver_id: ++ playerargs = (driver_id,) ++ else: ++ playerargs = () ++ ++ myplayer = apply(choices[modchoice],playerargs) # Either AOPlayer or LADPlayer + if verbose: + print "Module choice: %s" % modchoice +