From: Jürg Billeter Date: Mon, 5 Jan 2009 22:30:15 +0000 (+0000) Subject: Do not accidentally generate stacked arrays X-Git-Tag: VALA_0_5_4~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49023806b39bcc4ef08eacf4bf38d63dda36a8e5;p=thirdparty%2Fvala.git Do not accidentally generate stacked arrays 2009-01-05 Jürg Billeter * vapigen/valagidlparser.vala: Do not accidentally generate stacked arrays * vapi/packages/gdk-2.0/: Fix gdk_keymap_get_entries_for_keyval, gdk_threads_add_idle, and gdk_window_remove_filter bindings, patch by Mark Lee, fixes bug 566679 * vapi/gdk-2.0.vapi: regenerated svn path=/trunk/; revision=2277 --- diff --git a/ChangeLog b/ChangeLog index 36939f1eb..394170036 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2009-01-05 Jürg Billeter + + * vapigen/valagidlparser.vala: + + Do not accidentally generate stacked arrays + + * vapi/packages/gdk-2.0/: + + Fix gdk_keymap_get_entries_for_keyval, gdk_threads_add_idle, and + gdk_window_remove_filter bindings, patch by Mark Lee, + fixes bug 566679 + + * vapi/gdk-2.0.vapi: regenerated + 2009-01-05 Jürg Billeter * vapi/packages/gtk+-2.0/: diff --git a/vapi/gdk-2.0.vapi b/vapi/gdk-2.0.vapi index 126306085..653d0e775 100644 --- a/vapi/gdk-2.0.vapi +++ b/vapi/gdk-2.0.vapi @@ -1,4 +1,4 @@ -/* gdk-2.0.vapi generated by lt-vapigen, do not modify. */ +/* gdk-2.0.vapi generated by vapigen, do not modify. */ [CCode (cprefix = "Gdk", lower_case_cprefix = "gdk_")] namespace Gdk { @@ -25,9 +25,9 @@ namespace Gdk { public weak Gdk.Visual visual; public void* windowing_data; public bool alloc_color (Gdk.Color color, bool writeable, bool best_match); - public int alloc_colors (Gdk.Color[][] colors, bool writeable, bool best_match, bool success); + public int alloc_colors (Gdk.Color[] colors, bool writeable, bool best_match, bool success); public void change (int ncolors); - public void free_colors (Gdk.Color[][] colors); + public void free_colors (Gdk.Color[] colors); public unowned Gdk.Screen get_screen (); public static unowned Gdk.Colormap get_system (); public unowned Gdk.Visual get_visual (); @@ -287,8 +287,8 @@ namespace Gdk { public weak Gdk.Display display; public static unowned Gdk.Keymap get_default (); public Pango.Direction get_direction (); - public bool get_entries_for_keycode (uint hardware_keycode, out unowned Gdk.KeymapKey[]? keys, out unowned uint[]? keyvals, int n_entries); - public bool get_entries_for_keyval (uint keyval, Gdk.KeymapKey[] keys); + public bool get_entries_for_keycode (uint hardware_keycode, out unowned Gdk.KeymapKey[] keys, out unowned uint[] keyvals, int n_entries); + public bool get_entries_for_keyval (uint keyval, out unowned Gdk.KeymapKey[] keys); public static unowned Gdk.Keymap get_for_display (Gdk.Display display); public bool have_bidi_layouts (); public uint lookup_key (Gdk.KeymapKey key); @@ -498,7 +498,7 @@ namespace Gdk { public void process_updates (bool update_children); public void raise (); public void register_dnd (); - public void remove_filter (Gdk.FilterFunc function, void* data); + public void remove_filter (Gdk.FilterFunc function); public void remove_redirection (); public void reparent (Gdk.Window new_parent, int x, int y); public void resize (int width, int height); @@ -1796,7 +1796,7 @@ namespace Gdk { [CCode (cheader_filename = "gdk/gdk.h")] public static int text_property_to_utf8_list_for_display (Gdk.Display display, Gdk.Atom encoding, int format, uchar[] text, int length, string list); [CCode (cheader_filename = "gdk/gdk.h")] - public static uint threads_add_idle (GLib.SourceFunc function, void* data); + public static uint threads_add_idle (GLib.SourceFunc function); [CCode (cheader_filename = "gdk/gdk.h")] public static uint threads_add_idle_full (int priority, GLib.SourceFunc function, void* data, GLib.DestroyNotify notify); [CCode (cheader_filename = "gdk/gdk.h")] diff --git a/vapi/packages/gdk-2.0/gdk-2.0.metadata b/vapi/packages/gdk-2.0/gdk-2.0.metadata index 01a9eaa38..2f82cdc83 100644 --- a/vapi/packages/gdk-2.0/gdk-2.0.metadata +++ b/vapi/packages/gdk-2.0/gdk-2.0.metadata @@ -36,8 +36,9 @@ gdk_init.argc hidden="1" gdk_init.argv is_array="1" is_ref="1" array_length_pos="0.9" gdk_init_check.argc hidden="1" gdk_init_check.argv is_array="1" is_ref="1" array_length_pos="0.9" -gdk_keymap_get_entries_for_keycode.keys is_array="1" is_out="1" nullable="1" -gdk_keymap_get_entries_for_keycode.keyvals is_array="1" is_out="1" nullable="1" +gdk_keymap_get_entries_for_keycode.keys is_array="1" is_out="1" +gdk_keymap_get_entries_for_keycode.keyvals is_array="1" is_out="1" +gdk_keymap_get_entries_for_keyval.keys is_array="1" is_out="1" GdkKeymapKey is_value_type="1" GdkNativeWindow is_value_type="1" GdkPangoAttr* is_value_type="1" @@ -65,11 +66,13 @@ GdkSegment is_value_type="1" GdkSpan is_value_type="1" gdk_spawn_on_screen.argv is_array="1" no_array_length="1" gdk_spawn_on_screen.envp is_array="1" no_array_length="1" +gdk_threads_add_idle.data hidden="1" GdkTimeCoord is_value_type="1" GdkTrapezoid is_value_type="1" GdkVisualClass hidden="1" GdkWChar is_value_type="1" gdk_window_add_filter.data hidden="1" +gdk_window_remove_filter.data hidden="1" gdk_window_at_pointer.win_x is_out="1" gdk_window_at_pointer.win_y is_out="1" gdk_window_constrain_size.new_width is_out="1" diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala index 708458fba..c038c2803 100644 --- a/vapigen/valagidlparser.vala +++ b/vapigen/valagidlparser.vala @@ -1536,10 +1536,12 @@ public class Vala.GIdlParser : CodeVisitor { } if (last_param != null && p.name == "n_" + last_param.name) { - // last_param is array, p is array length - last_param_type = new ArrayType (last_param_type, 1, last_param_type.source_reference); - last_param.parameter_type = last_param_type; - last_param.direction = ParameterDirection.IN; + if (!(last_param_type is ArrayType)) { + // last_param is array, p is array length + last_param_type = new ArrayType (last_param_type, 1, last_param_type.source_reference); + last_param.parameter_type = last_param_type; + last_param.direction = ParameterDirection.IN; + } // hide array length param hide_param = true;