From bac3fd5ae1b783237100a1e5edf989ce7bd39d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 10 May 2012 02:55:14 +0200 Subject: [PATCH spice-gtk] python: fix Spice.Audio binding The spice_audio_new() function is not correctly generated h2def.py anymore because of the surrounding #ifdef and macros. Add it in the manual.defs instead. Avoid API breakage: 2012-05-10 01:56:48,884 (cli:83): Uncaught exception: Traceback (most recent call last): File /usr/share/virt-manager/virtManager/console.py, line 475, in _channel_new_cb self.audio = spice.Audio(self.spice_session) TypeError: GObject.__init__() takes exactly 0 arguments (1 given) https://bugzilla.redhat.com/show_bug.cgi?id=820335 --- gtk/spice-client-gtk-manual.defs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gtk/spice-client-gtk-manual.defs b/gtk/spice-client-gtk-manual.defs index 60f207c..9631b74 100644 --- a/gtk/spice-client-gtk-manual.defs +++ b/gtk/spice-client-gtk-manual.defs @@ -104,3 +104,14 @@ '("failed" "SPICE_CLIENT_ERROR_FAILED") ) ) + +(define-function spice_audio_new + (c-name "spice_audio_new") + (is-constructor-of "SpiceAudio") + (return-type "SpiceAudio*") + (parameters + '("SpiceSession*" "session") + '("GMainContext*" "context") + '("const-char*" "name") + ) +) -- 1.7.10.1