[pulseaudio-tickets] [Bug 40290] Vala Bindings cause errors

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Aug 24 07:12:59 PDT 2011


https://bugs.freedesktop.org/show_bug.cgi?id=40290

--- Comment #4 from bsquared <bwcode4u at gmail.com> 2011-08-24 07:12:59 PDT ---
(In reply to comment #3)
> The failure occurs because to_string() is generated with the assumption that
> the enum is a GEnum. We either need to add a manual to_string override for all
> enums (which is doable, just painful), or you need to do the switch-case
> yourself.

The Vala documentation sets the expectation level by stating that the
to_string() method is built in.  If the code were not added, then I think it
should be clearly documented. 

This was posted on the Vala list regarding list items 1 and 3.
1.
>> /.../Source/vala/pulse-device-chooser/src/main.t c:160:47: error:
>> ‘PA_CONTEXT_TYPE_STATE’ undeclared (first use in this function)
> Looks like a missing CCode annotation in the VAPI. Depending on whether
> Context.State has a GType
>
> [CCode (type_id = "pa_context_state_get_type ()")]
>
> or
>
> [CCode (has_type_id = false)]

3 . 
>> main.c:643:31: error: ‘PULSE_AUDIO_TYPE_SINK_INFO’ undeclared (first
>> use in this function)
> The solution is the same as above... either specify the correct type id
> or set has_type_id = false for SinkInfo.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the pulseaudio-bugs mailing list