[gimp/wip/nielsdg/string-array-to-strv: 20/20] pdbgen




commit db3ca5bc1bc184dc582cbbad589a253b01c30eb6
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Wed Dec 1 22:35:25 2021 +0100

    pdbgen

 app/pdb/brushes-cmds.c      | 23 +++++---------
 app/pdb/buffer-cmds.c       | 23 +++++---------
 app/pdb/context-cmds.c      | 23 +++++---------
 app/pdb/dynamics-cmds.c     | 23 +++++---------
 app/pdb/fonts-cmds.c        | 23 +++++---------
 app/pdb/gimp-cmds.c         | 22 +++++--------
 app/pdb/gradients-cmds.c    | 23 +++++---------
 app/pdb/image-cmds.c        | 23 +++++---------
 app/pdb/item-cmds.c         | 23 +++++---------
 app/pdb/palettes-cmds.c     | 23 +++++---------
 app/pdb/patterns-cmds.c     | 23 +++++---------
 app/pdb/pdb-cmds.c          | 45 +++++++++------------------
 app/pdb/plug-in-cmds.c      | 76 ++++++++++++++++-----------------------------
 libgimp/gimp_pdb.c          | 12 ++-----
 libgimp/gimp_pdb.h          |  2 +-
 libgimp/gimpbrushes_pdb.c   | 14 ++-------
 libgimp/gimpbrushes_pdb.h   |  3 +-
 libgimp/gimpbuffer_pdb.c    | 13 ++------
 libgimp/gimpbuffer_pdb.h    |  3 +-
 libgimp/gimpcontext_pdb.c   | 12 ++-----
 libgimp/gimpcontext_pdb.h   |  3 +-
 libgimp/gimpdynamics_pdb.c  | 13 ++------
 libgimp/gimpdynamics_pdb.h  |  3 +-
 libgimp/gimpfonts_pdb.c     | 14 ++-------
 libgimp/gimpfonts_pdb.h     |  3 +-
 libgimp/gimpgradients_pdb.c | 13 ++------
 libgimp/gimpgradients_pdb.h |  3 +-
 libgimp/gimpimage_pdb.c     | 13 ++------
 libgimp/gimpimage_pdb.h     |  3 +-
 libgimp/gimpitem_pdb.c      | 13 ++------
 libgimp/gimpitem_pdb.h      |  3 +-
 libgimp/gimppalettes_pdb.c  | 13 ++------
 libgimp/gimppalettes_pdb.h  |  3 +-
 libgimp/gimppatterns_pdb.c  | 13 ++------
 libgimp/gimppatterns_pdb.h  |  3 +-
 libgimp/gimppdb_pdb.c       | 23 +++-----------
 libgimp/gimppdb_pdb.h       |  4 +--
 37 files changed, 167 insertions(+), 408 deletions(-)
---
diff --git a/app/pdb/brushes-cmds.c b/app/pdb/brushes-cmds.c
index 53b0c48972..e4d620ee74 100644
--- a/app/pdb/brushes-cmds.c
+++ b/app/pdb/brushes-cmds.c
@@ -67,7 +67,6 @@ brushes_get_list_invoker (GimpProcedure         *procedure,
   gboolean success = TRUE;
   GimpValueArray *return_vals;
   const gchar *filter;
-  gint num_brushes = 0;
   gchar **brush_list = NULL;
 
   filter = g_value_get_string (gimp_value_array_index (args, 0));
@@ -75,17 +74,14 @@ brushes_get_list_invoker (GimpProcedure         *procedure,
   if (success)
     {
       brush_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container 
(gimp->brush_factory),
-                                                           filter, &num_brushes);
+                                                           filter);
     }
 
   return_vals = gimp_procedure_get_return_values (procedure, success,
                                                   error ? *error : NULL);
 
   if (success)
-    {
-      g_value_set_int (gimp_value_array_index (return_vals, 1), num_brushes);
-      gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), brush_list, num_brushes);
-    }
+    g_value_take_boxed (gimp_value_array_index (return_vals, 1), brush_list);
 
   return return_vals;
 }
@@ -134,16 +130,11 @@ register_brushes_procs (GimpPDB *pdb)
                                                        NULL,
                                                        GIMP_PARAM_READWRITE));
   gimp_procedure_add_return_value (procedure,
-                                   g_param_spec_int ("num-brushes",
-                                                     "num brushes",
-                                                     "The number of brushes in the brush list",
-                                                     0, G_MAXINT32, 0,
-                                                     GIMP_PARAM_READWRITE));
-  gimp_procedure_add_return_value (procedure,
-                                   gimp_param_spec_string_array ("brush-list",
-                                                                 "brush list",
-                                                                 "The list of brush names",
-                                                                 GIMP_PARAM_READWRITE));
+                                   g_param_spec_boxed ("brush-list",
+                                                       "brush list",
+                                                       "The list of brush names",
+                                                       G_TYPE_STRV,
+                                                       GIMP_PARAM_READWRITE));
   gimp_pdb_register_procedure (pdb, procedure);
   g_object_unref (procedure);
 }
diff --git a/app/pdb/buffer-cmds.c b/app/pdb/buffer-cmds.c
index 6797a357af..25770ddcc2 100644
--- a/app/pdb/buffer-cmds.c
+++ b/app/pdb/buffer-cmds.c
@@ -53,7 +53,6 @@ buffers_get_list_invoker (GimpProcedure         *procedure,
   gboolean success = TRUE;
   GimpValueArray *return_vals;
   const gchar *filter;
-  gint num_buffers = 0;
   gchar **buffer_list = NULL;
 
   filter = g_value_get_string (gimp_value_array_index (args, 0));
@@ -61,17 +60,14 @@ buffers_get_list_invoker (GimpProcedure         *procedure,
   if (success)
     {
       buffer_list = gimp_container_get_filtered_name_array (gimp->named_buffers,
-                                                            filter, &num_buffers);
+                                                            filter);
     }
 
   return_vals = gimp_procedure_get_return_values (procedure, success,
                                                   error ? *error : NULL);
 
   if (success)
-    {
-      g_value_set_int (gimp_value_array_index (return_vals, 1), num_buffers);
-      gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), buffer_list, num_buffers);
-    }
+    g_value_take_boxed (gimp_value_array_index (return_vals, 1), buffer_list);
 
   return return_vals;
 }
@@ -309,16 +305,11 @@ register_buffer_procs (GimpPDB *pdb)
                                                        NULL,
                                                        GIMP_PARAM_READWRITE));
   gimp_procedure_add_return_value (procedure,
-                                   g_param_spec_int ("num-buffers",
-                                                     "num buffers",
-                                                     "The number of buffers",
-                                                     0, G_MAXINT32, 0,
-                                                     GIMP_PARAM_READWRITE));
-  gimp_procedure_add_return_value (procedure,
-                                   gimp_param_spec_string_array ("buffer-list",
-                                                                 "buffer list",
-                                                                 "The list of buffer names",
-                                                                 GIMP_PARAM_READWRITE));
+                                   g_param_spec_boxed ("buffer-list",
+                                                       "buffer list",
+                                                       "The list of buffer names",
+                                                       G_TYPE_STRV,
+                                                       GIMP_PARAM_READWRITE));
   gimp_pdb_register_procedure (pdb, procedure);
   g_object_unref (procedure);
 
diff --git a/app/pdb/context-cmds.c b/app/pdb/context-cmds.c
index 2878b75c05..e5da6c498b 100644
--- a/app/pdb/context-cmds.c
+++ b/app/pdb/context-cmds.c
@@ -114,16 +114,12 @@ context_list_paint_methods_invoker (GimpProcedure         *procedure,
                                     GError               **error)
 {
   GimpValueArray *return_vals;
-  gint num_paint_methods = 0;
   gchar **paint_methods = NULL;
 
-  paint_methods = gimp_container_get_name_array (gimp->paint_info_list,
-                                                 &num_paint_methods);
+  paint_methods = gimp_container_get_name_array (gimp->paint_info_list);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-
-  g_value_set_int (gimp_value_array_index (return_vals, 1), num_paint_methods);
-  gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), paint_methods, num_paint_methods);
+  g_value_take_boxed (gimp_value_array_index (return_vals, 1), paint_methods);
 
   return return_vals;
 }
@@ -3092,16 +3088,11 @@ register_context_procs (GimpPDB *pdb)
                                          "Simon Budig",
                                          "2007");
   gimp_procedure_add_return_value (procedure,
-                                   g_param_spec_int ("num-paint-methods",
-                                                     "num paint methods",
-                                                     "The number of the available paint methods",
-                                                     0, G_MAXINT32, 0,
-                                                     GIMP_PARAM_READWRITE));
-  gimp_procedure_add_return_value (procedure,
-                                   gimp_param_spec_string_array ("paint-methods",
-                                                                 "paint methods",
-                                                                 "The names of the available paint methods",
-                                                                 GIMP_PARAM_READWRITE));
+                                   g_param_spec_boxed ("paint-methods",
+                                                       "paint methods",
+                                                       "The names of the available paint methods",
+                                                       G_TYPE_STRV,
+                                                       GIMP_PARAM_READWRITE));
   gimp_pdb_register_procedure (pdb, procedure);
   g_object_unref (procedure);
 
diff --git a/app/pdb/dynamics-cmds.c b/app/pdb/dynamics-cmds.c
index 593d011ffe..7e598d66d8 100644
--- a/app/pdb/dynamics-cmds.c
+++ b/app/pdb/dynamics-cmds.c
@@ -62,7 +62,6 @@ dynamics_get_list_invoker (GimpProcedure         *procedure,
   gboolean success = TRUE;
   GimpValueArray *return_vals;
   const gchar *filter;
-  gint num_dynamics = 0;
   gchar **dynamics_list = NULL;
 
   filter = g_value_get_string (gimp_value_array_index (args, 0));
@@ -70,17 +69,14 @@ dynamics_get_list_invoker (GimpProcedure         *procedure,
   if (success)
     {
       dynamics_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container 
(gimp->dynamics_factory),
-                                                              filter, &num_dynamics);
+                                                              filter);
     }
 
   return_vals = gimp_procedure_get_return_values (procedure, success,
                                                   error ? *error : NULL);
 
   if (success)
-    {
-      g_value_set_int (gimp_value_array_index (return_vals, 1), num_dynamics);
-      gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), dynamics_list, num_dynamics);
-    }
+    g_value_take_boxed (gimp_value_array_index (return_vals, 1), dynamics_list);
 
   return return_vals;
 }
@@ -129,16 +125,11 @@ register_dynamics_procs (GimpPDB *pdb)
                                                        NULL,
                                                        GIMP_PARAM_READWRITE));
   gimp_procedure_add_return_value (procedure,
-                                   g_param_spec_int ("num-dynamics",
-                                                     "num dynamics",
-                                                     "The number of available paint dynamics",
-                                                     0, G_MAXINT32, 0,
-                                                     GIMP_PARAM_READWRITE));
-  gimp_procedure_add_return_value (procedure,
-                                   gimp_param_spec_string_array ("dynamics-list",
-                                                                 "dynamics list",
-                                                                 "The list of paint dynamics names",
-                                                                 GIMP_PARAM_READWRITE));
+                                   g_param_spec_boxed ("dynamics-list",
+                                                       "dynamics list",
+                                                       "The list of paint dynamics names",
+                                                       G_TYPE_STRV,
+                                                       GIMP_PARAM_READWRITE));
   gimp_pdb_register_procedure (pdb, procedure);
   g_object_unref (procedure);
 }
diff --git a/app/pdb/fonts-cmds.c b/app/pdb/fonts-cmds.c
index f8d187e9c8..10896a50d3 100644
--- a/app/pdb/fonts-cmds.c
+++ b/app/pdb/fonts-cmds.c
@@ -63,7 +63,6 @@ fonts_get_list_invoker (GimpProcedure         *procedure,
   gboolean success = TRUE;
   GimpValueArray *return_vals;
   const gchar *filter;
-  gint num_fonts = 0;
   gchar **font_list = NULL;
 
   filter = g_value_get_string (gimp_value_array_index (args, 0));
@@ -76,7 +75,7 @@ fonts_get_list_invoker (GimpProcedure         *procedure,
       if (success)
         {
           font_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container 
(gimp->font_factory),
-                                                              filter, &num_fonts);
+                                                              filter);
         }
     }
 
@@ -84,10 +83,7 @@ fonts_get_list_invoker (GimpProcedure         *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    {
-      g_value_set_int (gimp_value_array_index (return_vals, 1), num_fonts);
-      gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), font_list, num_fonts);
-    }
+    g_value_take_boxed (gimp_value_array_index (return_vals, 1), font_list);
 
   return return_vals;
 }
@@ -136,16 +132,11 @@ register_fonts_procs (GimpPDB *pdb)
                                                        NULL,
                                                        GIMP_PARAM_READWRITE));
   gimp_procedure_add_return_value (procedure,
-                                   g_param_spec_int ("num-fonts",
-                                                     "num fonts",
-                                                     "The number of available fonts",
-                                                     0, G_MAXINT32, 0,
-                                                     GIMP_PARAM_READWRITE));
-  gimp_procedure_add_return_value (procedure,
-                                   gimp_param_spec_string_array ("font-list",
-                                                                 "font list",
-                                                                 "The list of font names",
-                                                                 GIMP_PARAM_READWRITE));
+                                   g_param_spec_boxed ("font-list",
+                                                       "font list",
+                                                       "The list of font names",
+                                                       G_TYPE_STRV,
+                                                       GIMP_PARAM_READWRITE));
   gimp_pdb_register_procedure (pdb, procedure);
   g_object_unref (procedure);
 }
diff --git a/app/pdb/gimp-cmds.c b/app/pdb/gimp-cmds.c
index 3cfdf92c33..7c2c6a7d6a 100644
--- a/app/pdb/gimp-cmds.c
+++ b/app/pdb/gimp-cmds.c
@@ -187,15 +187,12 @@ get_parasite_list_invoker (GimpProcedure         *procedure,
                            GError               **error)
 {
   GimpValueArray *return_vals;
-  gint num_parasites = 0;
   gchar **parasites = NULL;
 
-  parasites = gimp_parasite_list (gimp, &num_parasites);
+  parasites = gimp_parasite_list (gimp);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-
-  g_value_set_int (gimp_value_array_index (return_vals, 1), num_parasites);
-  gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), parasites, num_parasites);
+  g_value_take_boxed (gimp_value_array_index (return_vals, 1), parasites);
 
   return return_vals;
 }
@@ -394,16 +391,11 @@ register_gimp_procs (GimpPDB *pdb)
                                          "Marc Lehmann",
                                          "1999");
   gimp_procedure_add_return_value (procedure,
-                                   g_param_spec_int ("num-parasites",
-                                                     "num parasites",
-                                                     "The number of attached parasites",
-                                                     0, G_MAXINT32, 0,
-                                                     GIMP_PARAM_READWRITE));
-  gimp_procedure_add_return_value (procedure,
-                                   gimp_param_spec_string_array ("parasites",
-                                                                 "parasites",
-                                                                 "The names of currently attached parasites",
-                                                                 GIMP_PARAM_READWRITE));
+                                   g_param_spec_boxed ("parasites",
+                                                       "parasites",
+                                                       "The names of currently attached parasites",
+                                                       G_TYPE_STRV,
+                                                       GIMP_PARAM_READWRITE));
   gimp_pdb_register_procedure (pdb, procedure);
   g_object_unref (procedure);
 
diff --git a/app/pdb/gradients-cmds.c b/app/pdb/gradients-cmds.c
index 0adecc525c..f69261dc52 100644
--- a/app/pdb/gradients-cmds.c
+++ b/app/pdb/gradients-cmds.c
@@ -66,7 +66,6 @@ gradients_get_list_invoker (GimpProcedure         *procedure,
   gboolean success = TRUE;
   GimpValueArray *return_vals;
   const gchar *filter;
-  gint num_gradients = 0;
   gchar **gradient_list = NULL;
 
   filter = g_value_get_string (gimp_value_array_index (args, 0));
@@ -74,17 +73,14 @@ gradients_get_list_invoker (GimpProcedure         *procedure,
   if (success)
     {
       gradient_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container 
(gimp->gradient_factory),
-                                                              filter, &num_gradients);
+                                                              filter);
     }
 
   return_vals = gimp_procedure_get_return_values (procedure, success,
                                                   error ? *error : NULL);
 
   if (success)
-    {
-      g_value_set_int (gimp_value_array_index (return_vals, 1), num_gradients);
-      gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), gradient_list, num_gradients);
-    }
+    g_value_take_boxed (gimp_value_array_index (return_vals, 1), gradient_list);
 
   return return_vals;
 }
@@ -133,16 +129,11 @@ register_gradients_procs (GimpPDB *pdb)
                                                        NULL,
                                                        GIMP_PARAM_READWRITE));
   gimp_procedure_add_return_value (procedure,
-                                   g_param_spec_int ("num-gradients",
-                                                     "num gradients",
-                                                     "The number of loaded gradients",
-                                                     0, G_MAXINT32, 0,
-                                                     GIMP_PARAM_READWRITE));
-  gimp_procedure_add_return_value (procedure,
-                                   gimp_param_spec_string_array ("gradient-list",
-                                                                 "gradient list",
-                                                                 "The list of gradient names",
-                                                                 GIMP_PARAM_READWRITE));
+                                   g_param_spec_boxed ("gradient-list",
+                                                       "gradient list",
+                                                       "The list of gradient names",
+                                                       G_TYPE_STRV,
+                                                       GIMP_PARAM_READWRITE));
   gimp_pdb_register_procedure (pdb, procedure);
   g_object_unref (procedure);
 }
diff --git a/app/pdb/image-cmds.c b/app/pdb/image-cmds.c
index 2ecc5a903b..bf2fb9e77a 100644
--- a/app/pdb/image-cmds.c
+++ b/app/pdb/image-cmds.c
@@ -2833,24 +2833,20 @@ image_get_parasite_list_invoker (GimpProcedure         *procedure,
   gboolean success = TRUE;
   GimpValueArray *return_vals;
   GimpImage *image;
-  gint num_parasites = 0;
   gchar **parasites = NULL;
 
   image = g_value_get_object (gimp_value_array_index (args, 0));
 
   if (success)
     {
-      parasites = gimp_image_parasite_list (image, &num_parasites);
+      parasites = gimp_image_parasite_list (image);
     }
 
   return_vals = gimp_procedure_get_return_values (procedure, success,
                                                   error ? *error : NULL);
 
   if (success)
-    {
-      g_value_set_int (gimp_value_array_index (return_vals, 1), num_parasites);
-      gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), parasites, num_parasites);
-    }
+    g_value_take_boxed (gimp_value_array_index (return_vals, 1), parasites);
 
   return return_vals;
 }
@@ -5641,16 +5637,11 @@ register_image_procs (GimpPDB *pdb)
                                                       FALSE,
                                                       GIMP_PARAM_READWRITE));
   gimp_procedure_add_return_value (procedure,
-                                   g_param_spec_int ("num-parasites",
-                                                     "num parasites",
-                                                     "The number of attached parasites",
-                                                     0, G_MAXINT32, 0,
-                                                     GIMP_PARAM_READWRITE));
-  gimp_procedure_add_return_value (procedure,
-                                   gimp_param_spec_string_array ("parasites",
-                                                                 "parasites",
-                                                                 "The names of currently attached parasites",
-                                                                 GIMP_PARAM_READWRITE));
+                                   g_param_spec_boxed ("parasites",
+                                                       "parasites",
+                                                       "The names of currently attached parasites",
+                                                       G_TYPE_STRV,
+                                                       GIMP_PARAM_READWRITE));
   gimp_pdb_register_procedure (pdb, procedure);
   g_object_unref (procedure);
 
diff --git a/app/pdb/item-cmds.c b/app/pdb/item-cmds.c
index 160954996a..9105695ac3 100644
--- a/app/pdb/item-cmds.c
+++ b/app/pdb/item-cmds.c
@@ -1001,24 +1001,20 @@ item_get_parasite_list_invoker (GimpProcedure         *procedure,
   gboolean success = TRUE;
   GimpValueArray *return_vals;
   GimpItem *item;
-  gint num_parasites = 0;
   gchar **parasites = NULL;
 
   item = g_value_get_object (gimp_value_array_index (args, 0));
 
   if (success)
     {
-      parasites = gimp_item_parasite_list (item, &num_parasites);
+      parasites = gimp_item_parasite_list (item);
     }
 
   return_vals = gimp_procedure_get_return_values (procedure, success,
                                                   error ? *error : NULL);
 
   if (success)
-    {
-      g_value_set_int (gimp_value_array_index (return_vals, 1), num_parasites);
-      gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), parasites, num_parasites);
-    }
+    g_value_take_boxed (gimp_value_array_index (return_vals, 1), parasites);
 
   return return_vals;
 }
@@ -1987,16 +1983,11 @@ register_item_procs (GimpPDB *pdb)
                                                      FALSE,
                                                      GIMP_PARAM_READWRITE));
   gimp_procedure_add_return_value (procedure,
-                                   g_param_spec_int ("num-parasites",
-                                                     "num parasites",
-                                                     "The number of attached parasites",
-                                                     0, G_MAXINT32, 0,
-                                                     GIMP_PARAM_READWRITE));
-  gimp_procedure_add_return_value (procedure,
-                                   gimp_param_spec_string_array ("parasites",
-                                                                 "parasites",
-                                                                 "The names of currently attached parasites",
-                                                                 GIMP_PARAM_READWRITE));
+                                   g_param_spec_boxed ("parasites",
+                                                       "parasites",
+                                                       "The names of currently attached parasites",
+                                                       G_TYPE_STRV,
+                                                       GIMP_PARAM_READWRITE));
   gimp_pdb_register_procedure (pdb, procedure);
   g_object_unref (procedure);
 }
diff --git a/app/pdb/palettes-cmds.c b/app/pdb/palettes-cmds.c
index 617604095a..1bfbee4a2a 100644
--- a/app/pdb/palettes-cmds.c
+++ b/app/pdb/palettes-cmds.c
@@ -66,7 +66,6 @@ palettes_get_list_invoker (GimpProcedure         *procedure,
   gboolean success = TRUE;
   GimpValueArray *return_vals;
   const gchar *filter;
-  gint num_palettes = 0;
   gchar **palette_list = NULL;
 
   filter = g_value_get_string (gimp_value_array_index (args, 0));
@@ -74,17 +73,14 @@ palettes_get_list_invoker (GimpProcedure         *procedure,
   if (success)
     {
       palette_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container 
(gimp->palette_factory),
-                                                             filter, &num_palettes);
+                                                             filter);
     }
 
   return_vals = gimp_procedure_get_return_values (procedure, success,
                                                   error ? *error : NULL);
 
   if (success)
-    {
-      g_value_set_int (gimp_value_array_index (return_vals, 1), num_palettes);
-      gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), palette_list, num_palettes);
-    }
+    g_value_take_boxed (gimp_value_array_index (return_vals, 1), palette_list);
 
   return return_vals;
 }
@@ -133,16 +129,11 @@ register_palettes_procs (GimpPDB *pdb)
                                                        NULL,
                                                        GIMP_PARAM_READWRITE));
   gimp_procedure_add_return_value (procedure,
-                                   g_param_spec_int ("num-palettes",
-                                                     "num palettes",
-                                                     "The number of palettes in the list",
-                                                     0, G_MAXINT32, 0,
-                                                     GIMP_PARAM_READWRITE));
-  gimp_procedure_add_return_value (procedure,
-                                   gimp_param_spec_string_array ("palette-list",
-                                                                 "palette list",
-                                                                 "The list of palette names",
-                                                                 GIMP_PARAM_READWRITE));
+                                   g_param_spec_boxed ("palette-list",
+                                                       "palette list",
+                                                       "The list of palette names",
+                                                       G_TYPE_STRV,
+                                                       GIMP_PARAM_READWRITE));
   gimp_pdb_register_procedure (pdb, procedure);
   g_object_unref (procedure);
 }
diff --git a/app/pdb/patterns-cmds.c b/app/pdb/patterns-cmds.c
index 7d5b635526..353444237f 100644
--- a/app/pdb/patterns-cmds.c
+++ b/app/pdb/patterns-cmds.c
@@ -67,7 +67,6 @@ patterns_get_list_invoker (GimpProcedure         *procedure,
   gboolean success = TRUE;
   GimpValueArray *return_vals;
   const gchar *filter;
-  gint num_patterns = 0;
   gchar **pattern_list = NULL;
 
   filter = g_value_get_string (gimp_value_array_index (args, 0));
@@ -75,17 +74,14 @@ patterns_get_list_invoker (GimpProcedure         *procedure,
   if (success)
     {
       pattern_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container 
(gimp->pattern_factory),
-                                                             filter, &num_patterns);
+                                                             filter);
     }
 
   return_vals = gimp_procedure_get_return_values (procedure, success,
                                                   error ? *error : NULL);
 
   if (success)
-    {
-      g_value_set_int (gimp_value_array_index (return_vals, 1), num_patterns);
-      gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), pattern_list, num_patterns);
-    }
+    g_value_take_boxed (gimp_value_array_index (return_vals, 1), pattern_list);
 
   return return_vals;
 }
@@ -134,16 +130,11 @@ register_patterns_procs (GimpPDB *pdb)
                                                        NULL,
                                                        GIMP_PARAM_READWRITE));
   gimp_procedure_add_return_value (procedure,
-                                   g_param_spec_int ("num-patterns",
-                                                     "num patterns",
-                                                     "The number of patterns in the pattern list",
-                                                     0, G_MAXINT32, 0,
-                                                     GIMP_PARAM_READWRITE));
-  gimp_procedure_add_return_value (procedure,
-                                   gimp_param_spec_string_array ("pattern-list",
-                                                                 "pattern list",
-                                                                 "The list of pattern names",
-                                                                 GIMP_PARAM_READWRITE));
+                                   g_param_spec_boxed ("pattern-list",
+                                                       "pattern list",
+                                                       "The list of pattern names",
+                                                       G_TYPE_STRV,
+                                                       GIMP_PARAM_READWRITE));
   gimp_pdb_register_procedure (pdb, procedure);
   g_object_unref (procedure);
 }
diff --git a/app/pdb/pdb-cmds.c b/app/pdb/pdb-cmds.c
index 7788c79553..7f167f8e13 100644
--- a/app/pdb/pdb-cmds.c
+++ b/app/pdb/pdb-cmds.c
@@ -134,7 +134,6 @@ pdb_query_invoker (GimpProcedure         *procedure,
   const gchar *copyright;
   const gchar *date;
   const gchar *proc_type;
-  gint num_matches = 0;
   gchar **procedure_names = NULL;
 
   name = g_value_get_string (gimp_value_array_index (args, 0));
@@ -150,7 +149,7 @@ pdb_query_invoker (GimpProcedure         *procedure,
       success = gimp_pdb_query (gimp->pdb,
                                 name, blurb, help, authors,
                                 copyright, date, proc_type,
-                                &num_matches, &procedure_names,
+                                &procedure_names,
                                 error);
     }
 
@@ -158,10 +157,7 @@ pdb_query_invoker (GimpProcedure         *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    {
-      g_value_set_int (gimp_value_array_index (return_vals, 1), num_matches);
-      gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), procedure_names, num_matches);
-    }
+    g_value_take_boxed (gimp_value_array_index (return_vals, 1), procedure_names);
 
   return return_vals;
 }
@@ -577,7 +573,6 @@ pdb_get_proc_menu_paths_invoker (GimpProcedure         *procedure,
   gboolean success = TRUE;
   GimpValueArray *return_vals;
   const gchar *procedure_name;
-  gint num_menu_paths = 0;
   gchar **menu_paths = NULL;
 
   procedure_name = g_value_get_string (gimp_value_array_index (args, 0));
@@ -592,6 +587,7 @@ pdb_get_proc_menu_paths_invoker (GimpProcedure         *procedure,
           if (GIMP_IS_PLUG_IN_PROCEDURE (proc))
             {
               GimpPlugInProcedure *plug_in_proc = GIMP_PLUG_IN_PROCEDURE (proc);
+              guint num_menu_paths;
 
               num_menu_paths = g_list_length (plug_in_proc->menu_paths);
 
@@ -621,10 +617,7 @@ pdb_get_proc_menu_paths_invoker (GimpProcedure         *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    {
-      g_value_set_int (gimp_value_array_index (return_vals, 1), num_menu_paths);
-      gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), menu_paths, num_menu_paths);
-    }
+    g_value_take_boxed (gimp_value_array_index (return_vals, 1), menu_paths);
 
   return return_vals;
 }
@@ -1331,16 +1324,11 @@ register_pdb_procs (GimpPDB *pdb)
                                                        NULL,
                                                        GIMP_PARAM_READWRITE));
   gimp_procedure_add_return_value (procedure,
-                                   g_param_spec_int ("num-matches",
-                                                     "num matches",
-                                                     "The number of matching procedures",
-                                                     0, G_MAXINT32, 0,
-                                                     GIMP_PARAM_READWRITE));
-  gimp_procedure_add_return_value (procedure,
-                                   gimp_param_spec_string_array ("procedure-names",
-                                                                 "procedure names",
-                                                                 "The list of procedure names",
-                                                                 GIMP_PARAM_READWRITE));
+                                   g_param_spec_boxed ("procedure-names",
+                                                       "procedure names",
+                                                       "The list of procedure names",
+                                                       G_TYPE_STRV,
+                                                       GIMP_PARAM_READWRITE));
   gimp_pdb_register_procedure (pdb, procedure);
   g_object_unref (procedure);
 
@@ -1696,16 +1684,11 @@ register_pdb_procs (GimpPDB *pdb)
                                                        NULL,
                                                        GIMP_PARAM_READWRITE));
   gimp_procedure_add_return_value (procedure,
-                                   g_param_spec_int ("num-menu-paths",
-                                                     "num menu paths",
-                                                     "The number of menu paths",
-                                                     0, G_MAXINT32, 0,
-                                                     GIMP_PARAM_READWRITE));
-  gimp_procedure_add_return_value (procedure,
-                                   gimp_param_spec_string_array ("menu-paths",
-                                                                 "menu paths",
-                                                                 "The menu paths of the plug-in",
-                                                                 GIMP_PARAM_READWRITE));
+                                   g_param_spec_boxed ("menu-paths",
+                                                       "menu paths",
+                                                       "The menu paths of the plug-in",
+                                                       G_TYPE_STRV,
+                                                       GIMP_PARAM_READWRITE));
   gimp_pdb_register_procedure (pdb, procedure);
   g_object_unref (procedure);
 
diff --git a/app/pdb/plug-in-cmds.c b/app/pdb/plug-in-cmds.c
index d1662c2303..78b82a0e5e 100644
--- a/app/pdb/plug-in-cmds.c
+++ b/app/pdb/plug-in-cmds.c
@@ -57,37 +57,28 @@ plug_ins_query_invoker (GimpProcedure         *procedure,
 {
   GimpValueArray *return_vals;
   const gchar *search_string;
-  gint num_procedures = 0;
   gchar **procedures = NULL;
-  gint num_accelerators = 0;
   gchar **accelerators = NULL;
-  gint num_locations = 0;
   gchar **locations = NULL;
   gint num_install_times = 0;
   gint32 *install_times = NULL;
 
   search_string = g_value_get_string (gimp_value_array_index (args, 0));
 
-  num_procedures = gimp_plug_in_manager_query (gimp->plug_in_manager,
-                                               search_string,
-                                               &procedures,
-                                               &accelerators,
-                                               &locations,
-                                               &install_times);
-  num_accelerators  = num_procedures;
-  num_locations     = num_procedures;
-  num_install_times = num_procedures;
+  num_install_times = gimp_plug_in_manager_query (gimp->plug_in_manager,
+                                                  search_string,
+                                                  &procedures,
+                                                  &accelerators,
+                                                  &locations,
+                                                  &install_times);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
 
-  g_value_set_int (gimp_value_array_index (return_vals, 1), num_procedures);
-  gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), procedures, num_procedures);
-  g_value_set_int (gimp_value_array_index (return_vals, 3), num_accelerators);
-  gimp_value_take_string_array (gimp_value_array_index (return_vals, 4), accelerators, num_accelerators);
-  g_value_set_int (gimp_value_array_index (return_vals, 5), num_locations);
-  gimp_value_take_string_array (gimp_value_array_index (return_vals, 6), locations, num_locations);
-  g_value_set_int (gimp_value_array_index (return_vals, 7), num_install_times);
-  gimp_value_take_int32_array (gimp_value_array_index (return_vals, 8), install_times, num_install_times);
+  g_value_take_boxed (gimp_value_array_index (return_vals, 1), procedures);
+  g_value_take_boxed (gimp_value_array_index (return_vals, 2), accelerators);
+  g_value_take_boxed (gimp_value_array_index (return_vals, 3), locations);
+  g_value_set_int (gimp_value_array_index (return_vals, 4), num_install_times);
+  gimp_value_take_int32_array (gimp_value_array_index (return_vals, 5), install_times, num_install_times);
 
   return return_vals;
 }
@@ -282,38 +273,23 @@ register_plug_in_procs (GimpPDB *pdb)
                                                        NULL,
                                                        GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
   gimp_procedure_add_return_value (procedure,
-                                   g_param_spec_int ("num-procedures",
-                                                     "num procedures",
-                                                     "The number of matching procedures",
-                                                     0, G_MAXINT32, 0,
-                                                     GIMP_PARAM_READWRITE));
-  gimp_procedure_add_return_value (procedure,
-                                   gimp_param_spec_string_array ("procedures",
-                                                                 "procedures",
-                                                                 "The plug-in procedure name",
-                                                                 GIMP_PARAM_READWRITE));
-  gimp_procedure_add_return_value (procedure,
-                                   g_param_spec_int ("num-accelerators",
-                                                     "num accelerators",
-                                                     "The number of matching procedures",
-                                                     0, G_MAXINT32, 0,
-                                                     GIMP_PARAM_READWRITE));
-  gimp_procedure_add_return_value (procedure,
-                                   gimp_param_spec_string_array ("accelerators",
-                                                                 "accelerators",
-                                                                 "String representing keyboard accelerator 
(could be empty string)",
-                                                                 GIMP_PARAM_READWRITE));
+                                   g_param_spec_boxed ("procedures",
+                                                       "procedures",
+                                                       "The plug-in procedure name",
+                                                       G_TYPE_STRV,
+                                                       GIMP_PARAM_READWRITE));
   gimp_procedure_add_return_value (procedure,
-                                   g_param_spec_int ("num-locations",
-                                                     "num locations",
-                                                     "The number of matching procedures",
-                                                     0, G_MAXINT32, 0,
-                                                     GIMP_PARAM_READWRITE));
+                                   g_param_spec_boxed ("accelerators",
+                                                       "accelerators",
+                                                       "String representing keyboard accelerator (could be 
empty string)",
+                                                       G_TYPE_STRV,
+                                                       GIMP_PARAM_READWRITE));
   gimp_procedure_add_return_value (procedure,
-                                   gimp_param_spec_string_array ("locations",
-                                                                 "locations",
-                                                                 "Location of the plug-in program",
-                                                                 GIMP_PARAM_READWRITE));
+                                   g_param_spec_boxed ("locations",
+                                                       "locations",
+                                                       "Location of the plug-in program",
+                                                       G_TYPE_STRV,
+                                                       GIMP_PARAM_READWRITE));
   gimp_procedure_add_return_value (procedure,
                                    g_param_spec_int ("num-install-times",
                                                      "num install times",
diff --git a/libgimp/gimp_pdb.c b/libgimp/gimp_pdb.c
index 43d10734c6..e4bba68103 100644
--- a/libgimp/gimp_pdb.c
+++ b/libgimp/gimp_pdb.c
@@ -215,20 +215,19 @@ gimp_get_parasite (const gchar *name)
 
 /**
  * gimp_get_parasite_list:
- * @num_parasites: (out): The number of attached parasites.
  *
  * List all parasites.
  *
  * Returns a list of all currently attached global parasites.
  *
- * Returns: (array length=num_parasites) (element-type gchar*) (transfer full):
+ * Returns: (array zero-terminated=1) (transfer full):
  *          The names of currently attached parasites.
  *          The returned value must be freed with g_strfreev().
  *
  * Since: 2.8
  **/
 gchar **
-gimp_get_parasite_list (gint *num_parasites)
+gimp_get_parasite_list (void)
 {
   GimpValueArray *args;
   GimpValueArray *return_vals;
@@ -242,13 +241,8 @@ gimp_get_parasite_list (gint *num_parasites)
                                               args);
   gimp_value_array_unref (args);
 
-  *num_parasites = 0;
-
   if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
-    {
-      *num_parasites = GIMP_VALUES_GET_INT (return_vals, 1);
-      parasites = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
-    }
+    parasites = GIMP_VALUES_DUP_STRV (return_vals, 1);
 
   gimp_value_array_unref (return_vals);
 
diff --git a/libgimp/gimp_pdb.h b/libgimp/gimp_pdb.h
index 7209094aa3..84785a95e8 100644
--- a/libgimp/gimp_pdb.h
+++ b/libgimp/gimp_pdb.h
@@ -37,7 +37,7 @@ gint          gimp_getpid            (void);
 gboolean      gimp_attach_parasite   (const GimpParasite *parasite);
 gboolean      gimp_detach_parasite   (const gchar        *name);
 GimpParasite* gimp_get_parasite      (const gchar        *name);
-gchar**       gimp_get_parasite_list (gint               *num_parasites);
+gchar**       gimp_get_parasite_list (void);
 GFile*        gimp_temp_file         (const gchar        *extension);
 
 
diff --git a/libgimp/gimpbrushes_pdb.c b/libgimp/gimpbrushes_pdb.c
index 1e06458ec1..43898291d4 100644
--- a/libgimp/gimpbrushes_pdb.c
+++ b/libgimp/gimpbrushes_pdb.c
@@ -69,7 +69,6 @@ gimp_brushes_refresh (void)
 /**
  * gimp_brushes_get_list:
  * @filter: An optional regular expression used to filter the list.
- * @num_brushes: (out): The number of brushes in the brush list.
  *
  * Retrieve a complete listing of the available brushes.
  *
@@ -77,13 +76,11 @@ gimp_brushes_refresh (void)
  * Each name returned can be used as input to the
  * gimp_context_set_brush() procedure.
  *
- * Returns: (array length=num_brushes) (element-type gchar*) (transfer full):
- *          The list of brush names.
+ * Returns: (array zero-terminated=1) (transfer full): The list of brush names.
  *          The returned value must be freed with g_strfreev().
  **/
 gchar **
-gimp_brushes_get_list (const gchar *filter,
-                       gint        *num_brushes)
+gimp_brushes_get_list (const gchar *filter)
 {
   GimpValueArray *args;
   GimpValueArray *return_vals;
@@ -98,13 +95,8 @@ gimp_brushes_get_list (const gchar *filter,
                                               args);
   gimp_value_array_unref (args);
 
-  *num_brushes = 0;
-
   if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
-    {
-      *num_brushes = GIMP_VALUES_GET_INT (return_vals, 1);
-      brush_list = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
-    }
+    brush_list = GIMP_VALUES_DUP_STRV (return_vals, 1);
 
   gimp_value_array_unref (return_vals);
 
diff --git a/libgimp/gimpbrushes_pdb.h b/libgimp/gimpbrushes_pdb.h
index d4f013a124..59c0d32e08 100644
--- a/libgimp/gimpbrushes_pdb.h
+++ b/libgimp/gimpbrushes_pdb.h
@@ -33,8 +33,7 @@ G_BEGIN_DECLS
 
 
 gboolean gimp_brushes_refresh  (void);
-gchar**  gimp_brushes_get_list (const gchar *filter,
-                                gint        *num_brushes);
+gchar**  gimp_brushes_get_list (const gchar *filter);
 
 
 G_END_DECLS
diff --git a/libgimp/gimpbuffer_pdb.c b/libgimp/gimpbuffer_pdb.c
index f262c8296c..1425ee501e 100644
--- a/libgimp/gimpbuffer_pdb.c
+++ b/libgimp/gimpbuffer_pdb.c
@@ -37,22 +37,20 @@
 /**
  * gimp_buffers_get_list:
  * @filter: An optional regular expression used to filter the list.
- * @num_buffers: (out): The number of buffers.
  *
  * Retrieve a complete listing of the available buffers.
  *
  * This procedure returns a complete listing of available named
  * buffers.
  *
- * Returns: (array length=num_buffers) (element-type gchar*) (transfer full):
+ * Returns: (array zero-terminated=1) (transfer full):
  *          The list of buffer names.
  *          The returned value must be freed with g_strfreev().
  *
  * Since: 2.4
  **/
 gchar **
-gimp_buffers_get_list (const gchar *filter,
-                       gint        *num_buffers)
+gimp_buffers_get_list (const gchar *filter)
 {
   GimpValueArray *args;
   GimpValueArray *return_vals;
@@ -67,13 +65,8 @@ gimp_buffers_get_list (const gchar *filter,
                                               args);
   gimp_value_array_unref (args);
 
-  *num_buffers = 0;
-
   if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
-    {
-      *num_buffers = GIMP_VALUES_GET_INT (return_vals, 1);
-      buffer_list = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
-    }
+    buffer_list = GIMP_VALUES_DUP_STRV (return_vals, 1);
 
   gimp_value_array_unref (return_vals);
 
diff --git a/libgimp/gimpbuffer_pdb.h b/libgimp/gimpbuffer_pdb.h
index 83b919664e..2d4564498c 100644
--- a/libgimp/gimpbuffer_pdb.h
+++ b/libgimp/gimpbuffer_pdb.h
@@ -32,8 +32,7 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
-gchar**           gimp_buffers_get_list      (const gchar *filter,
-                                              gint        *num_buffers);
+gchar**           gimp_buffers_get_list      (const gchar *filter);
 gchar*            gimp_buffer_rename         (const gchar *buffer_name,
                                               const gchar *new_name);
 gboolean          gimp_buffer_delete         (const gchar *buffer_name);
diff --git a/libgimp/gimpcontext_pdb.c b/libgimp/gimpcontext_pdb.c
index b5673b927a..8f40e9d49c 100644
--- a/libgimp/gimpcontext_pdb.c
+++ b/libgimp/gimpcontext_pdb.c
@@ -144,8 +144,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) (array length=num_paint_methods) (element-type gchar*) (transfer full): The names 
of the available paint methods.
+ * @paint_methods: (out) (array zero-terminated=1) (transfer full): The names of the available paint methods.
  *
  * Lists the available paint methods.
  *
@@ -157,8 +156,7 @@ gimp_context_set_defaults (void)
  * Since: 2.4
  **/
 gboolean
-gimp_context_list_paint_methods (gint    *num_paint_methods,
-                                 gchar ***paint_methods)
+gimp_context_list_paint_methods (gchar ***paint_methods)
 {
   GimpValueArray *args;
   GimpValueArray *return_vals;
@@ -172,16 +170,12 @@ gimp_context_list_paint_methods (gint    *num_paint_methods,
                                               args);
   gimp_value_array_unref (args);
 
-  *num_paint_methods = 0;
   *paint_methods = NULL;
 
   success = GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS;
 
   if (success)
-    {
-      *num_paint_methods = GIMP_VALUES_GET_INT (return_vals, 1);
-      *paint_methods = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
-    }
+    *paint_methods = GIMP_VALUES_DUP_STRV (return_vals, 1);
 
   gimp_value_array_unref (return_vals);
 
diff --git a/libgimp/gimpcontext_pdb.h b/libgimp/gimpcontext_pdb.h
index 743037e309..3865949563 100644
--- a/libgimp/gimpcontext_pdb.h
+++ b/libgimp/gimpcontext_pdb.h
@@ -35,8 +35,7 @@ G_BEGIN_DECLS
 gboolean                    gimp_context_push                           (void);
 gboolean                    gimp_context_pop                            (void);
 gboolean                    gimp_context_set_defaults                   (void);
-gboolean                    gimp_context_list_paint_methods             (gint                          
*num_paint_methods,
-                                                                         gchar                       
***paint_methods);
+gboolean                    gimp_context_list_paint_methods             (gchar                       
***paint_methods);
 gchar*                      gimp_context_get_paint_method               (void);
 gboolean                    gimp_context_set_paint_method               (const gchar                   
*name);
 GimpStrokeMethod            gimp_context_get_stroke_method              (void);
diff --git a/libgimp/gimpdynamics_pdb.c b/libgimp/gimpdynamics_pdb.c
index 1e1e7f6907..4d6d1bd2ad 100644
--- a/libgimp/gimpdynamics_pdb.c
+++ b/libgimp/gimpdynamics_pdb.c
@@ -72,22 +72,20 @@ gimp_dynamics_refresh (void)
 /**
  * gimp_dynamics_get_list:
  * @filter: An optional regular expression used to filter the list.
- * @num_dynamics: (out): The number of available paint dynamics.
  *
  * Retrieve the list of loaded paint dynamics.
  *
  * This procedure returns a list of the paint dynamics that are
  * currently available.
  *
- * Returns: (array length=num_dynamics) (element-type gchar*) (transfer full):
+ * Returns: (array zero-terminated=1) (transfer full):
  *          The list of paint dynamics names.
  *          The returned value must be freed with g_strfreev().
  *
  * Since: 2.8
  **/
 gchar **
-gimp_dynamics_get_list (const gchar *filter,
-                        gint        *num_dynamics)
+gimp_dynamics_get_list (const gchar *filter)
 {
   GimpValueArray *args;
   GimpValueArray *return_vals;
@@ -102,13 +100,8 @@ gimp_dynamics_get_list (const gchar *filter,
                                               args);
   gimp_value_array_unref (args);
 
-  *num_dynamics = 0;
-
   if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
-    {
-      *num_dynamics = GIMP_VALUES_GET_INT (return_vals, 1);
-      dynamics_list = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
-    }
+    dynamics_list = GIMP_VALUES_DUP_STRV (return_vals, 1);
 
   gimp_value_array_unref (return_vals);
 
diff --git a/libgimp/gimpdynamics_pdb.h b/libgimp/gimpdynamics_pdb.h
index 6623ffc01d..0c57b1ed37 100644
--- a/libgimp/gimpdynamics_pdb.h
+++ b/libgimp/gimpdynamics_pdb.h
@@ -33,8 +33,7 @@ G_BEGIN_DECLS
 
 
 gboolean gimp_dynamics_refresh  (void);
-gchar**  gimp_dynamics_get_list (const gchar *filter,
-                                 gint        *num_dynamics);
+gchar**  gimp_dynamics_get_list (const gchar *filter);
 
 
 G_END_DECLS
diff --git a/libgimp/gimpfonts_pdb.c b/libgimp/gimpfonts_pdb.c
index 10c78d1f62..8b15183c3b 100644
--- a/libgimp/gimpfonts_pdb.c
+++ b/libgimp/gimpfonts_pdb.c
@@ -70,20 +70,17 @@ gimp_fonts_refresh (void)
 /**
  * gimp_fonts_get_list:
  * @filter: An optional regular expression used to filter the list.
- * @num_fonts: (out): The number of available fonts.
  *
  * Retrieve the list of loaded fonts.
  *
  * This procedure returns a list of the fonts that are currently
  * available.
  *
- * Returns: (array length=num_fonts) (element-type gchar*) (transfer full):
- *          The list of font names.
+ * Returns: (array zero-terminated=1) (transfer full): The list of font names.
  *          The returned value must be freed with g_strfreev().
  **/
 gchar **
-gimp_fonts_get_list (const gchar *filter,
-                     gint        *num_fonts)
+gimp_fonts_get_list (const gchar *filter)
 {
   GimpValueArray *args;
   GimpValueArray *return_vals;
@@ -98,13 +95,8 @@ gimp_fonts_get_list (const gchar *filter,
                                               args);
   gimp_value_array_unref (args);
 
-  *num_fonts = 0;
-
   if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
-    {
-      *num_fonts = GIMP_VALUES_GET_INT (return_vals, 1);
-      font_list = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
-    }
+    font_list = GIMP_VALUES_DUP_STRV (return_vals, 1);
 
   gimp_value_array_unref (return_vals);
 
diff --git a/libgimp/gimpfonts_pdb.h b/libgimp/gimpfonts_pdb.h
index 8ef2a7b0ac..d5679b857a 100644
--- a/libgimp/gimpfonts_pdb.h
+++ b/libgimp/gimpfonts_pdb.h
@@ -33,8 +33,7 @@ G_BEGIN_DECLS
 
 
 gboolean gimp_fonts_refresh  (void);
-gchar**  gimp_fonts_get_list (const gchar *filter,
-                              gint        *num_fonts);
+gchar**  gimp_fonts_get_list (const gchar *filter);
 
 
 G_END_DECLS
diff --git a/libgimp/gimpgradients_pdb.c b/libgimp/gimpgradients_pdb.c
index c241e15f52..b431138d20 100644
--- a/libgimp/gimpgradients_pdb.c
+++ b/libgimp/gimpgradients_pdb.c
@@ -69,7 +69,6 @@ gimp_gradients_refresh (void)
 /**
  * gimp_gradients_get_list:
  * @filter: An optional regular expression used to filter the list.
- * @num_gradients: (out): The number of loaded gradients.
  *
  * Retrieve the list of loaded gradients.
  *
@@ -77,13 +76,12 @@ gimp_gradients_refresh (void)
  * loaded. You can later use the gimp_context_set_gradient() function
  * to set the active gradient.
  *
- * Returns: (array length=num_gradients) (element-type gchar*) (transfer full):
+ * Returns: (array zero-terminated=1) (transfer full):
  *          The list of gradient names.
  *          The returned value must be freed with g_strfreev().
  **/
 gchar **
-gimp_gradients_get_list (const gchar *filter,
-                         gint        *num_gradients)
+gimp_gradients_get_list (const gchar *filter)
 {
   GimpValueArray *args;
   GimpValueArray *return_vals;
@@ -98,13 +96,8 @@ gimp_gradients_get_list (const gchar *filter,
                                               args);
   gimp_value_array_unref (args);
 
-  *num_gradients = 0;
-
   if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
-    {
-      *num_gradients = GIMP_VALUES_GET_INT (return_vals, 1);
-      gradient_list = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
-    }
+    gradient_list = GIMP_VALUES_DUP_STRV (return_vals, 1);
 
   gimp_value_array_unref (return_vals);
 
diff --git a/libgimp/gimpgradients_pdb.h b/libgimp/gimpgradients_pdb.h
index 218a7e11b6..f12d1f6627 100644
--- a/libgimp/gimpgradients_pdb.h
+++ b/libgimp/gimpgradients_pdb.h
@@ -33,8 +33,7 @@ G_BEGIN_DECLS
 
 
 gboolean gimp_gradients_refresh  (void);
-gchar**  gimp_gradients_get_list (const gchar *filter,
-                                  gint        *num_gradients);
+gchar**  gimp_gradients_get_list (const gchar *filter);
 
 
 G_END_DECLS
diff --git a/libgimp/gimpimage_pdb.c b/libgimp/gimpimage_pdb.c
index d6a88a4187..2371de93e7 100644
--- a/libgimp/gimpimage_pdb.c
+++ b/libgimp/gimpimage_pdb.c
@@ -3432,7 +3432,6 @@ gimp_image_get_parasite (GimpImage   *image,
 /**
  * gimp_image_get_parasite_list:
  * @image: The image.
- * @num_parasites: (out): The number of attached parasites.
  *
  * List all parasites.
  *
@@ -3440,15 +3439,14 @@ gimp_image_get_parasite (GimpImage   *image,
  * These names can later be used to get the actual #GimpParasite with
  * gimp_image_get_parasite() when needed.
  *
- * Returns: (array length=num_parasites) (element-type gchar*) (transfer full):
+ * Returns: (array zero-terminated=1) (transfer full):
  *          The names of currently attached parasites.
  *          The returned value must be freed with g_strfreev().
  *
  * Since: 2.8
  **/
 gchar **
-gimp_image_get_parasite_list (GimpImage *image,
-                              gint      *num_parasites)
+gimp_image_get_parasite_list (GimpImage *image)
 {
   GimpValueArray *args;
   GimpValueArray *return_vals;
@@ -3463,13 +3461,8 @@ gimp_image_get_parasite_list (GimpImage *image,
                                               args);
   gimp_value_array_unref (args);
 
-  *num_parasites = 0;
-
   if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
-    {
-      *num_parasites = GIMP_VALUES_GET_INT (return_vals, 1);
-      parasites = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
-    }
+    parasites = GIMP_VALUES_DUP_STRV (return_vals, 1);
 
   gimp_value_array_unref (return_vals);
 
diff --git a/libgimp/gimpimage_pdb.h b/libgimp/gimpimage_pdb.h
index a994a71cc7..90d74f6b08 100644
--- a/libgimp/gimpimage_pdb.h
+++ b/libgimp/gimpimage_pdb.h
@@ -196,8 +196,7 @@ gboolean                 gimp_image_detach_parasite            (GimpImage
                                                                 const gchar         *name);
 GimpParasite*            gimp_image_get_parasite               (GimpImage           *image,
                                                                 const gchar         *name);
-gchar**                  gimp_image_get_parasite_list          (GimpImage           *image,
-                                                                gint                *num_parasites);
+gchar**                  gimp_image_get_parasite_list          (GimpImage           *image);
 gboolean                 gimp_image_policy_rotate              (GimpImage           *image,
                                                                 gboolean             interactive);
 gboolean                 gimp_image_policy_color_profile       (GimpImage           *image,
diff --git a/libgimp/gimpitem_pdb.c b/libgimp/gimpitem_pdb.c
index 839101285f..f86311e1dc 100644
--- a/libgimp/gimpitem_pdb.c
+++ b/libgimp/gimpitem_pdb.c
@@ -1236,21 +1236,19 @@ gimp_item_get_parasite (GimpItem    *item,
 /**
  * gimp_item_get_parasite_list:
  * @item: The item.
- * @num_parasites: (out): The number of attached parasites.
  *
  * List all parasites.
  *
  * Returns a list of all parasites currently attached the an item.
  *
- * Returns: (array length=num_parasites) (element-type gchar*) (transfer full):
+ * Returns: (array zero-terminated=1) (transfer full):
  *          The names of currently attached parasites.
  *          The returned value must be freed with g_strfreev().
  *
  * Since: 2.8
  **/
 gchar **
-gimp_item_get_parasite_list (GimpItem *item,
-                             gint     *num_parasites)
+gimp_item_get_parasite_list (GimpItem *item)
 {
   GimpValueArray *args;
   GimpValueArray *return_vals;
@@ -1265,13 +1263,8 @@ gimp_item_get_parasite_list (GimpItem *item,
                                               args);
   gimp_value_array_unref (args);
 
-  *num_parasites = 0;
-
   if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
-    {
-      *num_parasites = GIMP_VALUES_GET_INT (return_vals, 1);
-      parasites = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
-    }
+    parasites = GIMP_VALUES_DUP_STRV (return_vals, 1);
 
   gimp_value_array_unref (return_vals);
 
diff --git a/libgimp/gimpitem_pdb.h b/libgimp/gimpitem_pdb.h
index 9bce970d62..2d44db9b87 100644
--- a/libgimp/gimpitem_pdb.h
+++ b/libgimp/gimpitem_pdb.h
@@ -76,8 +76,7 @@ gboolean      gimp_item_detach_parasite   (GimpItem           *item,
                                            const gchar        *name);
 GimpParasite* gimp_item_get_parasite      (GimpItem           *item,
                                            const gchar        *name);
-gchar**       gimp_item_get_parasite_list (GimpItem           *item,
-                                           gint               *num_parasites);
+gchar**       gimp_item_get_parasite_list (GimpItem           *item);
 
 
 G_END_DECLS
diff --git a/libgimp/gimppalettes_pdb.c b/libgimp/gimppalettes_pdb.c
index a949154753..469450a4b0 100644
--- a/libgimp/gimppalettes_pdb.c
+++ b/libgimp/gimppalettes_pdb.c
@@ -69,7 +69,6 @@ gimp_palettes_refresh (void)
 /**
  * gimp_palettes_get_list:
  * @filter: An optional regular expression used to filter the list.
- * @num_palettes: (out): The number of palettes in the list.
  *
  * Retrieves a list of all of the available palettes
  *
@@ -77,13 +76,12 @@ gimp_palettes_refresh (void)
  * Each name returned can be used as input to the command
  * gimp_context_set_palette().
  *
- * Returns: (array length=num_palettes) (element-type gchar*) (transfer full):
+ * Returns: (array zero-terminated=1) (transfer full):
  *          The list of palette names.
  *          The returned value must be freed with g_strfreev().
  **/
 gchar **
-gimp_palettes_get_list (const gchar *filter,
-                        gint        *num_palettes)
+gimp_palettes_get_list (const gchar *filter)
 {
   GimpValueArray *args;
   GimpValueArray *return_vals;
@@ -98,13 +96,8 @@ gimp_palettes_get_list (const gchar *filter,
                                               args);
   gimp_value_array_unref (args);
 
-  *num_palettes = 0;
-
   if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
-    {
-      *num_palettes = GIMP_VALUES_GET_INT (return_vals, 1);
-      palette_list = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
-    }
+    palette_list = GIMP_VALUES_DUP_STRV (return_vals, 1);
 
   gimp_value_array_unref (return_vals);
 
diff --git a/libgimp/gimppalettes_pdb.h b/libgimp/gimppalettes_pdb.h
index 3b65fe22c5..18e975c359 100644
--- a/libgimp/gimppalettes_pdb.h
+++ b/libgimp/gimppalettes_pdb.h
@@ -33,8 +33,7 @@ G_BEGIN_DECLS
 
 
 gboolean gimp_palettes_refresh  (void);
-gchar**  gimp_palettes_get_list (const gchar *filter,
-                                 gint        *num_palettes);
+gchar**  gimp_palettes_get_list (const gchar *filter);
 
 
 G_END_DECLS
diff --git a/libgimp/gimppatterns_pdb.c b/libgimp/gimppatterns_pdb.c
index fcca94d2bb..82e21eab65 100644
--- a/libgimp/gimppatterns_pdb.c
+++ b/libgimp/gimppatterns_pdb.c
@@ -69,7 +69,6 @@ gimp_patterns_refresh (void)
 /**
  * gimp_patterns_get_list:
  * @filter: An optional regular expression used to filter the list.
- * @num_patterns: (out): The number of patterns in the pattern list.
  *
  * Retrieve a complete listing of the available patterns.
  *
@@ -77,13 +76,12 @@ gimp_patterns_refresh (void)
  * patterns. Each name returned can be used as input to the
  * gimp_context_set_pattern().
  *
- * Returns: (array length=num_patterns) (element-type gchar*) (transfer full):
+ * Returns: (array zero-terminated=1) (transfer full):
  *          The list of pattern names.
  *          The returned value must be freed with g_strfreev().
  **/
 gchar **
-gimp_patterns_get_list (const gchar *filter,
-                        gint        *num_patterns)
+gimp_patterns_get_list (const gchar *filter)
 {
   GimpValueArray *args;
   GimpValueArray *return_vals;
@@ -98,13 +96,8 @@ gimp_patterns_get_list (const gchar *filter,
                                               args);
   gimp_value_array_unref (args);
 
-  *num_patterns = 0;
-
   if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
-    {
-      *num_patterns = GIMP_VALUES_GET_INT (return_vals, 1);
-      pattern_list = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
-    }
+    pattern_list = GIMP_VALUES_DUP_STRV (return_vals, 1);
 
   gimp_value_array_unref (return_vals);
 
diff --git a/libgimp/gimppatterns_pdb.h b/libgimp/gimppatterns_pdb.h
index 066d460e3e..592791d029 100644
--- a/libgimp/gimppatterns_pdb.h
+++ b/libgimp/gimppatterns_pdb.h
@@ -33,8 +33,7 @@ G_BEGIN_DECLS
 
 
 gboolean gimp_patterns_refresh  (void);
-gchar**  gimp_patterns_get_list (const gchar *filter,
-                                 gint        *num_patterns);
+gchar**  gimp_patterns_get_list (const gchar *filter);
 
 
 G_END_DECLS
diff --git a/libgimp/gimppdb_pdb.c b/libgimp/gimppdb_pdb.c
index 8fc6e01b35..61daa3da51 100644
--- a/libgimp/gimppdb_pdb.c
+++ b/libgimp/gimppdb_pdb.c
@@ -103,8 +103,7 @@ _gimp_pdb_dump (GFile *file)
  * @copyright: The regex for procedure copyright.
  * @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) (array length=num_matches) (element-type gchar*) (transfer full): The list of 
procedure names.
+ * @procedure_names: (out) (array zero-terminated=1) (transfer full): The list of procedure names.
  *
  * Queries the procedural database for its contents using regular
  * expression matching.
@@ -132,7 +131,6 @@ _gimp_pdb_query (const gchar   *name,
                  const gchar   *copyright,
                  const gchar   *date,
                  const gchar   *proc_type,
-                 gint          *num_matches,
                  gchar       ***procedure_names)
 {
   GimpValueArray *args;
@@ -154,16 +152,12 @@ _gimp_pdb_query (const gchar   *name,
                                               args);
   gimp_value_array_unref (args);
 
-  *num_matches = 0;
   *procedure_names = NULL;
 
   success = GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS;
 
   if (success)
-    {
-      *num_matches = GIMP_VALUES_GET_INT (return_vals, 1);
-      *procedure_names = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
-    }
+    *procedure_names = GIMP_VALUES_DUP_STRV (return_vals, 1);
 
   gimp_value_array_unref (return_vals);
 
@@ -578,21 +572,19 @@ _gimp_pdb_add_proc_menu_path (const gchar *procedure_name,
 /**
  * _gimp_pdb_get_proc_menu_paths:
  * @procedure_name: The procedure name.
- * @num_menu_paths: (out): The number of menu paths.
  *
  * Queries the procedural database for the procedure's menu paths.
  *
  * This procedure returns the menu paths of the specified procedure.
  *
- * Returns: (array length=num_menu_paths) (element-type gchar*) (transfer full):
+ * Returns: (array zero-terminated=1) (transfer full):
  *          The menu paths of the plug-in.
  *          The returned value must be freed with g_strfreev().
  *
  * Since: 3.0
  **/
 gchar **
-_gimp_pdb_get_proc_menu_paths (const gchar *procedure_name,
-                               gint        *num_menu_paths)
+_gimp_pdb_get_proc_menu_paths (const gchar *procedure_name)
 {
   GimpValueArray *args;
   GimpValueArray *return_vals;
@@ -607,13 +599,8 @@ _gimp_pdb_get_proc_menu_paths (const gchar *procedure_name,
                                               args);
   gimp_value_array_unref (args);
 
-  *num_menu_paths = 0;
-
   if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
-    {
-      *num_menu_paths = GIMP_VALUES_GET_INT (return_vals, 1);
-      menu_paths = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
-    }
+    menu_paths = GIMP_VALUES_DUP_STRV (return_vals, 1);
 
   gimp_value_array_unref (return_vals);
 
diff --git a/libgimp/gimppdb_pdb.h b/libgimp/gimppdb_pdb.h
index 3d1d77056b..d77b6bcd3b 100644
--- a/libgimp/gimppdb_pdb.h
+++ b/libgimp/gimppdb_pdb.h
@@ -41,7 +41,6 @@ G_GNUC_INTERNAL gboolean    _gimp_pdb_query                          (const gcha
                                                                       const gchar       *copyright,
                                                                       const gchar       *date,
                                                                       const gchar       *proc_type,
-                                                                      gint              *num_matches,
                                                                       gchar           ***procedure_names);
 G_GNUC_INTERNAL gboolean    _gimp_pdb_proc_exists                    (const gchar       *procedure_name);
 G_GNUC_INTERNAL gboolean    _gimp_pdb_get_proc_info                  (const gchar       *procedure_name,
@@ -62,8 +61,7 @@ G_GNUC_INTERNAL gboolean    _gimp_pdb_set_proc_menu_label            (const gcha
 G_GNUC_INTERNAL gchar*      _gimp_pdb_get_proc_menu_label            (const gchar       *procedure_name);
 G_GNUC_INTERNAL gboolean    _gimp_pdb_add_proc_menu_path             (const gchar       *procedure_name,
                                                                       const gchar       *menu_path);
-G_GNUC_INTERNAL gchar**     _gimp_pdb_get_proc_menu_paths            (const gchar       *procedure_name,
-                                                                      gint              *num_menu_paths);
+G_GNUC_INTERNAL gchar**     _gimp_pdb_get_proc_menu_paths            (const gchar       *procedure_name);
 G_GNUC_INTERNAL gboolean    _gimp_pdb_set_proc_icon                  (const gchar       *procedure_name,
                                                                       GimpIconType       icon_type,
                                                                       gint               icon_data_length,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]