vala r2331 - in trunk: . gobject
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r2331 - in trunk: . gobject
- Date: Sun, 11 Jan 2009 14:45:44 +0000 (UTC)
Author: juergbi
Date: Sun Jan 11 14:45:44 2009
New Revision: 2331
URL: http://svn.gnome.org/viewvc/vala?rev=2331&view=rev
Log:
2009-01-11 JÃrg Billeter <j bitron ch>
* gobject/valaccodedelegatemodule.vala:
Support null-terminated array parameters in delegates,
patch by Ali Sabil
Modified:
trunk/ChangeLog
trunk/gobject/valaccodedelegatemodule.vala
Modified: trunk/gobject/valaccodedelegatemodule.vala
==============================================================================
--- trunk/gobject/valaccodedelegatemodule.vala (original)
+++ trunk/gobject/valaccodedelegatemodule.vala Sun Jan 11 14:45:44 2009
@@ -295,7 +295,12 @@
var array_type = (ArrayType) param.parameter_type;
for (int dim = 1; dim <= array_type.rank; dim++) {
CCodeExpression clength;
- if (d_params.get (i).no_array_length) {
+ if (d_params.get (i).array_null_terminated) {
+ requires_array_length = true;
+ var len_call = new CCodeFunctionCall (new CCodeIdentifier ("_vala_array_length"));
+ len_call.add_argument (new CCodeIdentifier (d_params.get (i).name));
+ clength = len_call;
+ } else if (d_params.get (i).no_array_length) {
clength = new CCodeConstant ("-1");
} else {
clength = new CCodeIdentifier (head.get_array_length_cname (d_params.get (i).name, dim));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]