[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#492772: python-pyao: Error with python2.5 on amd64



Package: python-pyao
Version: 0.82-2
Severity: normal


Instantiating ao.AudioDevice with options gives an error

  Python 2.5.2 (r252:60911, May 28 2008, 19:19:25) 
  [GCC 4.2.4 (Debian 4.2.4-1)] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import ao
  >>> dev = ao.AudioDevice( 'alsa', options = { 'dev' : 'default' } )
  Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  SystemError: NULL result without error in PyObject_Call
  >>> 

Compiling from source gives a hint:
  src/aomodule.c: In function ‘dict_to_options’:
  src/aomodule.c:18: warning: passing argument 2 of ‘PyDict_Next’ from
incompatible pointer type

Applying the following patch cures warning and bug:

--- pyao-0.82.orig/src/aomodule.c       2003-07-24 08:52:59.000000000
+0200
+++ pyao-0.82/src/aomodule.c    2008-07-28 20:34:42.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;

Regards, Philipp


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.24-jp2 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-pyao depends on:
ii  libao2                        0.8.8-4    Cross Platform Audio Output Librar
ii  libc6                         2.7-10     GNU C Library: Shared libraries
ii  python                        2.5.2-1    An interactive high-level object-o
ii  python-central                0.6.8      register and build utility for Pyt

python-pyao recommends no packages.

-- no debconf information



Reply to: