Your message dated Sun, 19 Feb 2012 15:24:58 +0100
with message-id <1329661498.21519.5.camel@puppet>
and subject line Re: vala 0.10 doesn't handle fixed-size arrays correctly but
0.12 does
has caused the Debian Bug report #622773,
regarding vala 0.10 doesn't handle fixed-size arrays correctly but 0.12 does
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
622773: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=622773
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: valac-0.10
Version: 0.10.4-1
Severity: normal
Tags: upstream fixed-upstream
Hi,
vala 0.10 doesn't handle fixed-size arrays correctly as it still thinks
they need to freed after use. With the attached minimal bindings for
pulseaudio and a simple test program, I get this:
$ valac-0.10 --vapidir=. --pkg=libpulse Test.vala
Test.vala:2.2-2.26: warning: field `Test.map' never used
PulseAudio.ChannelMap map;
^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/ccJ40C4Z.o: In function `test_finalize':
Test.vala.c:(.text+0x152): undefined reference to
`pulse_audio_channel_map_destroy'
collect2: ld returned 1 exit status
error: cc exited with status 256
Compilation failed: 1 error(s), 1 warning(s)
$
vala 0.12 behaves correctly:
$ valac-0.12 --vapidir=. --pkg=libpulse Test.vala
Test.vala:2.2-2.26: warning: field `Test.map' never used
PulseAudio.ChannelMap map;
^^^^^^^^^^^^^^^^^^^^^^^^^
Compilation succeeded - 1 warning(s)
$
I guess that one of these [1] commits fixed the issue. If you have to
use vala 0.10, you can use something like this as a workaround (thanks
to Sean McNamara![2]):
$ diff -u libpulse.vapi.old libpulse.vapi
--- libpulse.vapi.old 2011-04-14 16:43:04.177836648 +0200
+++ libpulse.vapi 2011-04-14 16:43:27.258335636 +0200
@@ -1,6 +1,6 @@
[CCode (cheader_filename="pulse/pulseaudio.h")]
namespace PulseAudio {
- [CCode (cname="pa_channel_map")]
+ [CCode (cname="pa_channel_map", has_destroy_function=false)]
public struct ChannelMap {
public uint8 channels;
public ChannelPosition map[32];
$ valac-0.10 --vapidir=. --pkg=libpulse Test.vala
Test.vala:2.2-2.26: warning: field `Test.map' never used
PulseAudio.ChannelMap map;
^^^^^^^^^^^^^^^^^^^^^^^^^
Compilation succeeded - 1 warning(s)
$
There is no need to take any action about this since the bug is fixed in
the latest upstream stable release, but I wanted to document it here for
later reference. If I have some spare time, I might try to exactly
pinpoint the fix and backport it to vala 0.10, so please don't close
this bug report for now.
Best regards
Alexander Kurtz
[1] http://git.gnome.org/browse/vala/log/?qt=grep&q=fixed.*array
[2]
https://tango.0pointer.de/pipermail/pulseaudio-discuss/2011-March/009695.html
[CCode (cheader_filename="pulse/pulseaudio.h")]
namespace PulseAudio {
[CCode (cname="pa_channel_map")]
public struct ChannelMap {
public uint8 channels;
public ChannelPosition map[32];
}
[CCode (cname="pa_channel_position_t", cprefix="PA_CHANNEL_POSITION_")]
public enum ChannelPosition {
INVALID
}
}
class Test : Object {
PulseAudio.ChannelMap map;
public static void main(){
}
}
signature.asc
Description: This is a digitally signed message part
--- End Message ---
--- Begin Message ---
Version: 0.12.1-2
Sebastian Dröge made Vala 0.12 the default on 2011-08-24[0],
so I'm closing this bug now.
Best regards
Alexander Kurtz
[0] http://packages.qa.debian.org/v/vala-0.12/news/20110824T084943Z.html
signature.asc
Description: This is a digitally signed message part
--- End Message ---