diff options
author | Alexander Kurtz <kurtz.alex@googlemail.com> | 2011-03-26 11:26:46 +0000 |
---|---|---|
committer | Colin Guthrie <cguthrie@mandriva.org> | 2011-03-26 11:26:57 +0000 |
commit | 9defe846e7d46c95aa024ac24fc4c4358d85bea3 (patch) | |
tree | 8b9d2ccbe4ec455e63f3c0567c3dd45dc0eefa7f /vala | |
parent | 8dc0df05383e12bb42511f5a732ee636d1a66603 (diff) |
vala: move GLibMainLoop class into separate file to fix linker errors
Vala uses the name of the *.vapi file to determine the libraries to link
against. Since the pa_glib_mainloop_*() functions are in a separate
library (libpulse-mainloop-glib.so) the corresponding objects in the
Vala bindings have to be in a separate *.vapi file.
If you are compiling an app without the GLib integration you could use:
$ valac --pkg=libpulse test.vala
but if you do use GLib you can use:
$ valac --pkg=libpulse-mainloop-glib test.vala
(libpulse is a dep of the libpulse-mainloop-glib so no need to specify
it explicitly)
Diffstat (limited to 'vala')
-rw-r--r-- | vala/libpulse-mainloop-glib.deps | 1 | ||||
-rw-r--r-- | vala/libpulse-mainloop-glib.vapi | 13 | ||||
-rw-r--r-- | vala/libpulse.vapi | 10 |
3 files changed, 14 insertions, 10 deletions
diff --git a/vala/libpulse-mainloop-glib.deps b/vala/libpulse-mainloop-glib.deps new file mode 100644 index 000000000..69bebf337 --- /dev/null +++ b/vala/libpulse-mainloop-glib.deps @@ -0,0 +1 @@ +libpulse diff --git a/vala/libpulse-mainloop-glib.vapi b/vala/libpulse-mainloop-glib.vapi new file mode 100644 index 000000000..a54cb4580 --- /dev/null +++ b/vala/libpulse-mainloop-glib.vapi @@ -0,0 +1,13 @@ +using GLib; + +namespace PulseAudio { + [Compact] + [CCode (cheader_filename="pulse/glib-mainloop.h", cname="pa_glib_mainloop", cprefix="pa_glib_mainloop_", free_function="pa_glib_mainloop_free")] + public class GLibMainLoop { + + [CCode (cname="pa_glib_mainloop_new")] + public GLibMainLoop(MainContext? c = null); + + public unowned MainLoopApi get_api(); + } +} diff --git a/vala/libpulse.vapi b/vala/libpulse.vapi index 8304911b7..4315988f1 100644 --- a/vala/libpulse.vapi +++ b/vala/libpulse.vapi @@ -879,16 +879,6 @@ namespace PulseAudio { } [Compact] - [CCode (cheader_filename="pulse/glib-mainloop.h", cname="pa_glib_mainloop", cprefix="pa_glib_mainloop_", free_function="pa_glib_mainloop_free")] - public class GLibMainLoop { - - [CCode (cname="pa_glib_mainloop_new")] - public GLibMainLoop(MainContext? c = null); - - public unowned MainLoopApi get_api(); - } - - [Compact] [CCode (cname="pa_operation", cprefix="pa_operation_", unref_function="pa_operation_unref", ref_function="pa_operation_ref")] public class Operation { |