Re: [Vala] embedding c code snippet in vala source.
- From: Alexey Lubimov <avl l14 ru>
- To: Jürg Billeter <j bitron ch>
- Cc: vala-list gnome org
- Subject: Re: [Vala] embedding c code snippet in vala source.
- Date: Fri, 22 Aug 2008 14:58:19 +0400
Jürg Billeter пишет:
On Fri, 2008-08-22 at 13:28 +0400, Alexey Lubimov wrote:
Jürg Billeter пишет:
Ok, as you agree that the null-terminated arrays should be handled,
your
g_strv_length example is not a real use case for the snippet support.
Can you provide a concrete example where you think it makes more sense
to use a CCode snippet than anything else?
Another case - utf8-compatible replacement for g_strndup()
string.substring is UTF-8 aware.
Thank you.
good replacement for:
./vala/valastringliteral.vala: var noquotes = value.offset
(1).ndup ((uint) (value.len () - 2));
is
./vala/valastringliteral.vala: var noquotes =
value.substring(1,value.len()-2);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]