From 05e68da4d49cd543fb536bbc0bdfd2d499a2e51f Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Wed, 31 Jul 2019 19:19:06 +0200 Subject: [PATCH] pdb, libgimp: add (array length=foo) annotations for out args --- libgimp/gimp_pdb.c | 6 ++--- libgimp/gimpbrush_pdb.c | 4 ++-- libgimp/gimpbrushes_pdb.c | 5 ++-- libgimp/gimpbuffer_pdb.c | 5 ++-- libgimp/gimpcontext_pdb.c | 4 ++-- libgimp/gimpdrawable_pdb.c | 7 +++--- libgimp/gimpdynamics_pdb.c | 5 ++-- libgimp/gimpfileops_pdb.c | 4 ++-- libgimp/gimpfonts_pdb.c | 5 ++-- libgimp/gimpgradient_pdb.c | 4 ++-- libgimp/gimpgradients_pdb.c | 5 ++-- libgimp/gimpimage_pdb.c | 36 +++++++++++++++-------------- libgimp/gimpimagecolorprofile_pdb.c | 12 +++++----- libgimp/gimpitem_pdb.c | 10 ++++---- libgimp/gimppalette_pdb.c | 4 ++-- libgimp/gimppalettes_pdb.c | 5 ++-- libgimp/gimppattern_pdb.c | 2 +- libgimp/gimppatterns_pdb.c | 5 ++-- libgimp/gimpproceduraldb_pdb.c | 4 ++-- libgimp/gimpvectors_pdb.c | 14 +++++------ pdb/lib.pl | 19 +++++++++++++-- 21 files changed, 95 insertions(+), 70 deletions(-) diff --git a/libgimp/gimp_pdb.c b/libgimp/gimp_pdb.c index 957a5381b8..745a1f9346 100644 --- a/libgimp/gimp_pdb.c +++ b/libgimp/gimp_pdb.c @@ -213,9 +213,9 @@ gimp_get_parasite (const gchar *name) * * Returns a list of all currently attached global parasites. * - * Returns: (element-type gchar*) (transfer full) The names of - * currently attached parasites. The returned value must be freed with - * g_strfreev(). + * Returns: (array length=num_parasites) (element-type gchar*) + * (transfer full) The names of currently attached parasites. The + * returned value must be freed with g_strfreev(). * * Since: 2.8 **/ diff --git a/libgimp/gimpbrush_pdb.c b/libgimp/gimpbrush_pdb.c index f6d032ef2c..6b886175ea 100644 --- a/libgimp/gimpbrush_pdb.c +++ b/libgimp/gimpbrush_pdb.c @@ -313,10 +313,10 @@ gimp_brush_get_info (const gchar *name, * @height: (out) The brush height. * @mask_bpp: (out) The brush mask bpp. * @num_mask_bytes: (out) Length of brush mask data. - * @mask_bytes: (out) (element-type guint8) (transfer full) The brush mask data. + * @mask_bytes: (out) (array length=num_mask_bytes) (element-type guint8) (transfer full) The brush mask data. * @color_bpp: (out) The brush color bpp. * @num_color_bytes: (out) Length of brush color data. - * @color_bytes: (out) (element-type guint8) (transfer full) The brush color data. + * @color_bytes: (out) (array length=num_color_bytes) (element-type guint8) (transfer full) The brush color data. * * Retrieves information about the specified brush. * diff --git a/libgimp/gimpbrushes_pdb.c b/libgimp/gimpbrushes_pdb.c index 69f3ef2e3f..ff926e3527 100644 --- a/libgimp/gimpbrushes_pdb.c +++ b/libgimp/gimpbrushes_pdb.c @@ -75,8 +75,9 @@ gimp_brushes_refresh (void) * Each name returned can be used as input to the * gimp_context_set_brush() procedure. * - * Returns: (element-type gchar*) (transfer full) The list of brush - * names. The returned value must be freed with g_strfreev(). + * Returns: (array length=num_brushes) (element-type gchar*) (transfer + * full) The list of brush names. The returned value must be freed with + * g_strfreev(). **/ gchar ** gimp_brushes_get_list (const gchar *filter, diff --git a/libgimp/gimpbuffer_pdb.c b/libgimp/gimpbuffer_pdb.c index c94656ce32..634b2a4f5d 100644 --- a/libgimp/gimpbuffer_pdb.c +++ b/libgimp/gimpbuffer_pdb.c @@ -44,8 +44,9 @@ * This procedure returns a complete listing of available named * buffers. * - * Returns: (element-type gchar*) (transfer full) The list of buffer - * names. The returned value must be freed with g_strfreev(). + * Returns: (array length=num_buffers) (element-type gchar*) (transfer + * full) The list of buffer names. The returned value must be freed + * with g_strfreev(). * * Since: 2.4 **/ diff --git a/libgimp/gimpcontext_pdb.c b/libgimp/gimpcontext_pdb.c index 7966ca1e66..5f008e2bcd 100644 --- a/libgimp/gimpcontext_pdb.c +++ b/libgimp/gimpcontext_pdb.c @@ -139,7 +139,7 @@ gimp_context_set_defaults (void) /** * gimp_context_list_paint_methods: * @num_paint_methods: (out) The number of the available paint methods. - * @paint_methods: (out) (element-type gchar*) (transfer full) The names of the available paint methods. + * @paint_methods: (out) (array length=num_paint_methods) (element-type gchar*) (transfer full) The names of the available paint methods. * * Lists the available paint methods. * @@ -1100,7 +1100,7 @@ gimp_context_set_line_dash_offset (gdouble dash_offset) /** * gimp_context_get_line_dash_pattern: * @num_dashes: (out) The number of dashes in the dash_pattern array. - * @dashes: (out) (element-type gdouble) (transfer full) The line dash pattern setting. + * @dashes: (out) (array length=num_dashes) (element-type gdouble) (transfer full) The line dash pattern setting. * * Get the line dash pattern setting. * diff --git a/libgimp/gimpdrawable_pdb.c b/libgimp/gimpdrawable_pdb.c index 0cc2ae5b28..2ccfb1b686 100644 --- a/libgimp/gimpdrawable_pdb.c +++ b/libgimp/gimpdrawable_pdb.c @@ -714,7 +714,8 @@ gimp_drawable_update (gint32 drawable_ID, * The 'num_channels' argument must always be equal to the * bytes-per-pixel value for the specified drawable. * - * Returns: (element-type guint8) (transfer full) The pixel value. + * Returns: (array length=num_channels) (element-type guint8) (transfer + * full) The pixel value. **/ guint8 * gimp_drawable_get_pixel (gint32 drawable_ID, @@ -912,7 +913,7 @@ gimp_drawable_offset (gint32 drawable_ID, * @actual_height: (out) The previews height. * @bpp: (out) The previews bpp. * @thumbnail_data_count: (out) The number of bytes in thumbnail data. - * @thumbnail_data: (out) (element-type guint8) (transfer full) The thumbnail data. + * @thumbnail_data: (out) (array length=thumbnail_data_count) (element-type guint8) (transfer full) The thumbnail data. * * Get a thumbnail of a drawable. * @@ -984,7 +985,7 @@ _gimp_drawable_thumbnail (gint32 drawable_ID, * @height: (out) The previews height. * @bpp: (out) The previews bpp. * @thumbnail_data_count: (out) The number of bytes in thumbnail data. - * @thumbnail_data: (out) (element-type guint8) (transfer full) The thumbnail data. + * @thumbnail_data: (out) (array length=thumbnail_data_count) (element-type guint8) (transfer full) The thumbnail data. * * Get a thumbnail of a sub-area of a drawable drawable. * diff --git a/libgimp/gimpdynamics_pdb.c b/libgimp/gimpdynamics_pdb.c index aa60ea16bd..4e8b74f592 100644 --- a/libgimp/gimpdynamics_pdb.c +++ b/libgimp/gimpdynamics_pdb.c @@ -77,8 +77,9 @@ gimp_dynamics_refresh (void) * This procedure returns a list of the paint dynamics that are * currently available. * - * Returns: (element-type gchar*) (transfer full) The list of paint - * dynamics names. The returned value must be freed with g_strfreev(). + * Returns: (array length=num_dynamics) (element-type gchar*) (transfer + * full) The list of paint dynamics names. The returned value must be + * freed with g_strfreev(). * * Since: 2.8 **/ diff --git a/libgimp/gimpfileops_pdb.c b/libgimp/gimpfileops_pdb.c index d27c70620c..7babac6494 100644 --- a/libgimp/gimpfileops_pdb.c +++ b/libgimp/gimpfileops_pdb.c @@ -141,8 +141,8 @@ gimp_file_load_layer (GimpRunMode run_mode, * needs to be added to the existing image with * gimp_image_insert_layer(). * - * Returns: (element-type gint32) (transfer full) The list of loaded - * layers. + * Returns: (array length=num_layers) (element-type gint32) (transfer + * full) The list of loaded layers. * * Since: 2.4 **/ diff --git a/libgimp/gimpfonts_pdb.c b/libgimp/gimpfonts_pdb.c index 24b6739849..5301d15536 100644 --- a/libgimp/gimpfonts_pdb.c +++ b/libgimp/gimpfonts_pdb.c @@ -75,8 +75,9 @@ gimp_fonts_refresh (void) * This procedure returns a list of the fonts that are currently * available. * - * Returns: (element-type gchar*) (transfer full) The list of font - * names. The returned value must be freed with g_strfreev(). + * Returns: (array length=num_fonts) (element-type gchar*) (transfer + * full) The list of font names. The returned value must be freed with + * g_strfreev(). **/ gchar ** gimp_fonts_get_list (const gchar *filter, diff --git a/libgimp/gimpgradient_pdb.c b/libgimp/gimpgradient_pdb.c index be77f64d99..dbd10a5e1c 100644 --- a/libgimp/gimpgradient_pdb.c +++ b/libgimp/gimpgradient_pdb.c @@ -254,7 +254,7 @@ gimp_gradient_get_number_of_segments (const gchar *name) * @num_samples: The number of samples to take. * @reverse: Use the reverse gradient. * @num_color_samples: (out) Length of the color_samples array (4 * num_samples). - * @color_samples: (out) (element-type gdouble) (transfer full) Color samples: { R1, G1, B1, A1, ..., Rn, Gn, Bn, An }. + * @color_samples: (out) (array length=num_color_samples) (element-type gdouble) (transfer full) Color samples: { R1, G1, B1, A1, ..., Rn, Gn, Bn, An }. * * Sample the specified in uniform parts. * @@ -316,7 +316,7 @@ gimp_gradient_get_uniform_samples (const gchar *name, * @positions: (array length=num_samples) (element-type gdouble) The list of positions to sample along the gradient. * @reverse: Use the reverse gradient. * @num_color_samples: (out) Length of the color_samples array (4 * num_samples). - * @color_samples: (out) (element-type gdouble) (transfer full) Color samples: { R1, G1, B1, A1, ..., Rn, Gn, Bn, An }. + * @color_samples: (out) (array length=num_color_samples) (element-type gdouble) (transfer full) Color samples: { R1, G1, B1, A1, ..., Rn, Gn, Bn, An }. * * Sample the specified gradient in custom positions. * diff --git a/libgimp/gimpgradients_pdb.c b/libgimp/gimpgradients_pdb.c index 13b18664ba..ce0007ac81 100644 --- a/libgimp/gimpgradients_pdb.c +++ b/libgimp/gimpgradients_pdb.c @@ -75,8 +75,9 @@ gimp_gradients_refresh (void) * loaded. You can later use the gimp_context_set_gradient() function * to set the active gradient. * - * Returns: (element-type gchar*) (transfer full) The list of gradient - * names. The returned value must be freed with g_strfreev(). + * Returns: (array length=num_gradients) (element-type gchar*) + * (transfer full) The list of gradient names. The returned value must + * be freed with g_strfreev(). **/ gchar ** gimp_gradients_get_list (const gchar *filter, diff --git a/libgimp/gimpimage_pdb.c b/libgimp/gimpimage_pdb.c index 4f01eb9a12..f3ffd31a8c 100644 --- a/libgimp/gimpimage_pdb.c +++ b/libgimp/gimpimage_pdb.c @@ -79,8 +79,9 @@ gimp_image_is_valid (gint32 image_ID) * * This procedure returns the list of images currently open in GIMP. * - * Returns: (element-type gint32) (transfer full) The list of images - * currently open. The returned value must be freed with g_free(). + * Returns: (array length=num_images) (element-type gint32) (transfer + * full) The list of images currently open. The returned value must be + * freed with g_free(). **/ gint * gimp_image_list (gint *num_images) @@ -462,9 +463,9 @@ gimp_image_height (gint32 image_ID) * This procedure returns the list of layers contained in the specified * image. The order of layers is from topmost to bottommost. * - * Returns: (element-type gint32) (transfer full) The list of layers - * contained in the image. The returned value must be freed with - * g_free(). + * Returns: (array length=num_layers) (element-type gint32) (transfer + * full) The list of layers contained in the image. The returned value + * must be freed with g_free(). **/ gint * gimp_image_get_layers (gint32 image_ID, @@ -508,9 +509,9 @@ gimp_image_get_layers (gint32 image_ID, * \"channels\" are custom channels and do not include the image's * color components. * - * Returns: (element-type gint32) (transfer full) The list of channels - * contained in the image. The returned value must be freed with - * g_free(). + * Returns: (array length=num_channels) (element-type gint32) (transfer + * full) The list of channels contained in the image. The returned + * value must be freed with g_free(). **/ gint * gimp_image_get_channels (gint32 image_ID, @@ -551,9 +552,9 @@ gimp_image_get_channels (gint32 image_ID, * This procedure returns the list of vectors contained in the * specified image. * - * Returns: (element-type gint32) (transfer full) The list of vectors - * contained in the image. The returned value must be freed with - * g_free(). + * Returns: (array length=num_vectors) (element-type gint32) (transfer + * full) The list of vectors contained in the image. The returned value + * must be freed with g_free(). * * Since: 2.4 **/ @@ -1731,8 +1732,9 @@ gimp_image_merge_down (gint32 image_ID, * 3. If the image is not in Indexed color mode, no colormap is * returned. * - * Returns: (element-type guint8) (transfer full) The image's colormap. - * The returned value must be freed with g_free(). + * Returns: (array length=num_bytes) (element-type guint8) (transfer + * full) The image's colormap. The returned value must be freed with + * g_free(). **/ guint8 * _gimp_image_get_colormap (gint32 image_ID, @@ -1958,7 +1960,7 @@ gimp_image_is_dirty (gint32 image_ID) * @actual_height: (out) The previews height. * @bpp: (out) The previews bpp. * @thumbnail_data_count: (out) The number of bytes in thumbnail data. - * @thumbnail_data: (out) (element-type guint8) (transfer full) The thumbnail data. + * @thumbnail_data: (out) (array length=thumbnail_data_count) (element-type guint8) (transfer full) The thumbnail data. * * Get a thumbnail of an image. * @@ -3314,9 +3316,9 @@ gimp_image_get_parasite (gint32 image_ID, * * Returns a list of all currently attached parasites. * - * Returns: (element-type gchar*) (transfer full) The names of - * currently attached parasites. The returned value must be freed with - * g_strfreev(). + * Returns: (array length=num_parasites) (element-type gchar*) + * (transfer full) The names of currently attached parasites. The + * returned value must be freed with g_strfreev(). * * Since: 2.8 **/ diff --git a/libgimp/gimpimagecolorprofile_pdb.c b/libgimp/gimpimagecolorprofile_pdb.c index 109cce16e9..109f12ed8b 100644 --- a/libgimp/gimpimagecolorprofile_pdb.c +++ b/libgimp/gimpimagecolorprofile_pdb.c @@ -44,9 +44,9 @@ * This procedure returns the image's color profile, or NULL if the * image has no color profile assigned. * - * Returns: (element-type guint8) (transfer full) The image's - * serialized color profile. The returned value must be freed with - * g_free(). + * Returns: (array length=num_bytes) (element-type guint8) (transfer + * full) The image's serialized color profile. The returned value must + * be freed with g_free(). * * Since: 2.10 **/ @@ -92,9 +92,9 @@ _gimp_image_get_color_profile (gint32 image_ID, * or a generated default RGB or grayscale profile, according to the * image's type. * - * Returns: (element-type guint8) (transfer full) The image's - * serialized color profile. The returned value must be freed with - * g_free(). + * Returns: (array length=num_bytes) (element-type guint8) (transfer + * full) The image's serialized color profile. The returned value must + * be freed with g_free(). * * Since: 2.10 **/ diff --git a/libgimp/gimpitem_pdb.c b/libgimp/gimpitem_pdb.c index 2b67299d3d..2ef869c639 100644 --- a/libgimp/gimpitem_pdb.c +++ b/libgimp/gimpitem_pdb.c @@ -469,8 +469,8 @@ gimp_item_get_parent (gint32 item_ID) * This procedure returns the list of items which are children of the * specified item. The order is topmost to bottommost. * - * Returns: (element-type gint32) (transfer full) The item's list of - * children. + * Returns: (array length=num_children) (element-type gint32) (transfer + * full) The item's list of children. * * Since: 2.8 **/ @@ -1217,9 +1217,9 @@ gimp_item_get_parasite (gint32 item_ID, * * Returns a list of all parasites currently attached the an item. * - * Returns: (element-type gchar*) (transfer full) The names of - * currently attached parasites. The returned value must be freed with - * g_strfreev(). + * Returns: (array length=num_parasites) (element-type gchar*) + * (transfer full) The names of currently attached parasites. The + * returned value must be freed with g_strfreev(). * * Since: 2.8 **/ diff --git a/libgimp/gimppalette_pdb.c b/libgimp/gimppalette_pdb.c index eace9c70be..242e38d47a 100644 --- a/libgimp/gimppalette_pdb.c +++ b/libgimp/gimppalette_pdb.c @@ -263,8 +263,8 @@ gimp_palette_get_info (const gchar *name, * * This procedure retrieves all color entries of the specified palette. * - * Returns: (element-type GimpRGB) (transfer full) The colors in the - * palette. + * Returns: (array length=num_colors) (element-type GimpRGB) (transfer + * full) The colors in the palette. * * Since: 2.6 **/ diff --git a/libgimp/gimppalettes_pdb.c b/libgimp/gimppalettes_pdb.c index 95fbb83fb6..5a43053704 100644 --- a/libgimp/gimppalettes_pdb.c +++ b/libgimp/gimppalettes_pdb.c @@ -75,8 +75,9 @@ gimp_palettes_refresh (void) * Each name returned can be used as input to the command * gimp_context_set_palette(). * - * Returns: (element-type gchar*) (transfer full) The list of palette - * names. The returned value must be freed with g_strfreev(). + * Returns: (array length=num_palettes) (element-type gchar*) (transfer + * full) The list of palette names. The returned value must be freed + * with g_strfreev(). **/ gchar ** gimp_palettes_get_list (const gchar *filter, diff --git a/libgimp/gimppattern_pdb.c b/libgimp/gimppattern_pdb.c index 97ddc60660..c97d699d42 100644 --- a/libgimp/gimppattern_pdb.c +++ b/libgimp/gimppattern_pdb.c @@ -93,7 +93,7 @@ gimp_pattern_get_info (const gchar *name, * @height: (out) The pattern height. * @bpp: (out) The pattern bpp. * @num_color_bytes: (out) Number of pattern bytes. - * @color_bytes: (out) (element-type guint8) (transfer full) The pattern data. + * @color_bytes: (out) (array length=num_color_bytes) (element-type guint8) (transfer full) The pattern data. * * Retrieve information about the specified pattern (including pixels). * diff --git a/libgimp/gimppatterns_pdb.c b/libgimp/gimppatterns_pdb.c index c500667240..835ab1311c 100644 --- a/libgimp/gimppatterns_pdb.c +++ b/libgimp/gimppatterns_pdb.c @@ -75,8 +75,9 @@ gimp_patterns_refresh (void) * patterns. Each name returned can be used as input to the * gimp_context_set_pattern(). * - * Returns: (element-type gchar*) (transfer full) The list of pattern - * names. The returned value must be freed with g_strfreev(). + * Returns: (array length=num_patterns) (element-type gchar*) (transfer + * full) The list of pattern names. The returned value must be freed + * with g_strfreev(). **/ gchar ** gimp_patterns_get_list (const gchar *filter, diff --git a/libgimp/gimpproceduraldb_pdb.c b/libgimp/gimpproceduraldb_pdb.c index 8403e1beb4..3dab16c03c 100644 --- a/libgimp/gimpproceduraldb_pdb.c +++ b/libgimp/gimpproceduraldb_pdb.c @@ -111,7 +111,7 @@ gimp_procedural_db_dump (const gchar *filename) * @date: The regex for procedure date. * @proc_type: The regex for procedure type: { 'Internal GIMP procedure', 'GIMP Plug-in', 'GIMP Extension', 'Temporary Procedure' }. * @num_matches: (out) The number of matching procedures. - * @procedure_names: (out) (element-type gchar*) (transfer full) The list of procedure names. + * @procedure_names: (out) (array length=num_matches) (element-type gchar*) (transfer full) The list of procedure names. * * Queries the procedural database for its contents using regular * expression matching. @@ -408,7 +408,7 @@ gimp_procedural_db_proc_val (const gchar *procedure_name, * _gimp_procedural_db_get_data: * @identifier: The identifier associated with data. * @bytes: (out) The number of bytes in the data. - * @data: (out) (element-type guint8) (transfer full) A byte array containing data. + * @data: (out) (array length=bytes) (element-type guint8) (transfer full) A byte array containing data. * * Returns data associated with the specified identifier. * diff --git a/libgimp/gimpvectors_pdb.c b/libgimp/gimpvectors_pdb.c index 1022cf9d97..056752546e 100644 --- a/libgimp/gimpvectors_pdb.c +++ b/libgimp/gimpvectors_pdb.c @@ -161,8 +161,8 @@ gimp_vectors_copy (gint32 vectors_ID) * Returns an Array with the stroke-IDs associated with the passed * path. * - * Returns: (element-type gint32) (transfer full) List of the strokes - * belonging to the path. + * Returns: (array length=num_strokes) (element-type gint32) (transfer + * full) List of the strokes belonging to the path. * * Since: 2.4 **/ @@ -635,7 +635,7 @@ gimp_vectors_stroke_flip_free (gint32 vectors_ID, * @vectors_ID: The vectors object. * @stroke_id: The stroke ID. * @num_points: (out) The number of floats returned. - * @controlpoints: (out) (element-type gdouble) (transfer full) List of the control points for the stroke (x0, y0, x1, y1, ...). + * @controlpoints: (out) (array length=num_points) (element-type gdouble) (transfer full) List of the control points for the stroke (x0, y0, x1, y1, ...). * @closed: (out) Whether the stroke is closed or not. * * returns the control points of a stroke. @@ -756,8 +756,8 @@ gimp_vectors_stroke_new_from_points (gint32 vectors_ID, * * returns polygonal approximation of the stroke. * - * Returns: (element-type gdouble) (transfer full) List of the coords - * along the path (x0, y0, x1, y1, ...). + * Returns: (array length=coords) (element-type gdouble) (transfer + * full) List of the coords along the path (x0, y0, x1, y1, ...). * * Since: 2.4 **/ @@ -1067,7 +1067,7 @@ gimp_vectors_bezier_stroke_new_ellipse (gint32 vectors_ID, * @merge: Merge paths into a single vectors object. * @scale: Scale the SVG to image dimensions. * @num_vectors: (out) The number of newly created vectors. - * @vectors_ids: (out) (element-type gint32) (transfer full) The list of newly created vectors. + * @vectors_ids: (out) (array length=num_vectors) (element-type gint32) (transfer full) The list of newly created vectors. * * Import paths from an SVG file. * @@ -1128,7 +1128,7 @@ gimp_vectors_import_from_file (gint32 image_ID, * @merge: Merge paths into a single vectors object. * @scale: Scale the SVG to image dimensions. * @num_vectors: (out) The number of newly created vectors. - * @vectors_ids: (out) (element-type gint32) (transfer full) The list of newly created vectors. + * @vectors_ids: (out) (array length=num_vectors) (element-type gint32) (transfer full) The list of newly created vectors. * * Import paths from an SVG string. * diff --git a/pdb/lib.pl b/pdb/lib.pl index 29c2d1b994..eaaeedbaeb 100644 --- a/pdb/lib.pl +++ b/pdb/lib.pl @@ -104,8 +104,14 @@ sub generate { # Find the return argument (defaults to the first arg if not # explicitly set - my $retarg = undef; $retvoid = 0; - foreach (@outargs) { $retarg = $_, last if exists $_->{retval} } + my $retarg = undef; + my $retindex = 0; + $retvoid = 0; + foreach (@outargs) { + $retarg = $_, last if exists $_->{retval}; + $retindex++; + } + unless ($retarg) { if (scalar @outargs) { if (exists $outargs[0]->{void_ret}) { @@ -127,6 +133,10 @@ sub generate { $retarg->{retval} = 1; + if (exists $argtype->{array}) { + $retdesc .= "(array length=@outargs[$retindex - 2]->{name}) "; + } + if (exists $argtype->{out_annotate}) { $retdesc .= "$argtype->{out_annotate} "; } @@ -338,6 +348,10 @@ CODE $argdesc .= '_ID' if $arg->{id}; $argdesc .= ": (out) "; + if (exists $arg->{array}) { + $argdesc .= "(array length=@outargs[$argc - 2]->{name}) "; + } + if (exists $arg->{out_annotate}) { $argdesc .= "$arg->{out_annotate} "; } @@ -358,6 +372,7 @@ CODE unless ($argdesc =~ /[\.\!\?]$/) { $argdesc .= '.' } unless ($argdesc =~ /\n$/) { $argdesc .= "\n" } } + $argc++; }