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
This commit is contained in:
Marc-André Lureau 2012-05-10 02:55:14 +02:00
parent f84e039f25
commit bac3fd5ae1

View File

@ -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")
)
)