[gimp/wip/nielsdg/reomve-gimpint16array] Remove GimpInt16Array




commit 8e81ead074993bb40963c58ed8a36674a62e0d76
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Fri Jan 8 00:14:52 2021 +0100

    Remove GimpInt16Array
    
    It isn't being used by any plug-in or any code in GIMP at all even.
    Let's get rid of it while we can still break API, so we can cut down on
    all the complexity of the gimp-param stuff a bit.

 app/core/gimp-memsize.c                          |   1 -
 app/pdb/gimppdb.c                                |   5 -
 app/plug-in/gimpplugin-message.c                 |   1 -
 devel-docs/app/app-sections.txt                  |  14 --
 devel-docs/libgimp/libgimp3-sections.txt         |   7 -
 devel-docs/libgimpbase/libgimpbase3-sections.txt |  14 --
 devel-docs/libgimpbase/libgimpbase3.types        |   2 -
 libgimp/gimp.c                                   |   1 -
 libgimp/gimpgpparams-body.c                      |  11 --
 libgimp/gimpprocedure-params.h                   |  30 ----
 libgimpbase/gimpbase.def                         |   8 --
 libgimpbase/gimpparamspecs.c                     | 171 -----------------------
 libgimpbase/gimpparamspecs.h                     |  45 ------
 libgimpconfig/gimpconfig-params.c                |   5 -
 pdb/app.pl                                       |   8 --
 pdb/pdb.pl                                       |  13 --
 plug-ins/script-fu/scheme-wrapper.c              |  72 ----------
 17 files changed, 408 deletions(-)
---
diff --git a/app/core/gimp-memsize.c b/app/core/gimp-memsize.c
index 7c55c7b0d0..5cffcbd49d 100644
--- a/app/core/gimp-memsize.c
+++ b/app/core/gimp-memsize.c
@@ -221,7 +221,6 @@ gimp_g_value_get_memsize (GValue *value)
         }
       else if (GIMP_VALUE_HOLDS_ARRAY (value)       ||
                GIMP_VALUE_HOLDS_UINT8_ARRAY (value) ||
-               GIMP_VALUE_HOLDS_INT16_ARRAY (value) ||
                GIMP_VALUE_HOLDS_INT32_ARRAY (value) ||
                GIMP_VALUE_HOLDS_FLOAT_ARRAY (value))
         {
diff --git a/app/pdb/gimppdb.c b/app/pdb/gimppdb.c
index 0eb542aade..a4759c8961 100644
--- a/app/pdb/gimppdb.c
+++ b/app/pdb/gimppdb.c
@@ -447,7 +447,6 @@ gimp_pdb_execute_procedure_by_name (GimpPDB       *pdb,
         }
 
       if (GIMP_VALUE_HOLDS_INT32_ARRAY (value)  ||
-          GIMP_VALUE_HOLDS_INT16_ARRAY (value)  ||
           GIMP_VALUE_HOLDS_UINT8_ARRAY (value)  ||
           GIMP_VALUE_HOLDS_FLOAT_ARRAY (value)  ||
           GIMP_VALUE_HOLDS_RGB_ARRAY (value)    ||
@@ -465,10 +464,6 @@ gimp_pdb_execute_procedure_by_name (GimpPDB       *pdb,
             gimp_value_set_int32_array (value,
                                         (const gint32 *) va_arg (va_args, gpointer),
                                         prev_int_value);
-          else if (GIMP_VALUE_HOLDS_INT16_ARRAY (value))
-            gimp_value_set_int16_array (value,
-                                        (const gint16 *) va_arg (va_args, gpointer),
-                                        prev_int_value);
           else if (GIMP_VALUE_HOLDS_UINT8_ARRAY (value))
             gimp_value_set_uint8_array (value,
                                         (const guint8 *) va_arg (va_args, gpointer),
diff --git a/app/plug-in/gimpplugin-message.c b/app/plug-in/gimpplugin-message.c
index 75cc4c0483..ac7465993d 100644
--- a/app/plug-in/gimpplugin-message.c
+++ b/app/plug-in/gimpplugin-message.c
@@ -730,7 +730,6 @@ gimp_plug_in_handle_proc_install (GimpPlugIn    *plug_in,
       GPParamDef *prev_param_def = &proc_install->params[i - 1];
 
       if ((! strcmp (param_def->type_name, "GimpParamInt32Array")     ||
-           ! strcmp (param_def->type_name, "GimpParamInt16Array")     ||
            ! strcmp (param_def->type_name, "GimpParamUInt8Array")     ||
            ! strcmp (param_def->type_name, "GimpParamIntFloatArray")  ||
            ! strcmp (param_def->type_name, "GimpParamIntStringArray") ||
diff --git a/devel-docs/app/app-sections.txt b/devel-docs/app/app-sections.txt
index e6beb7d34d..527ce529bf 100644
--- a/devel-docs/app/app-sections.txt
+++ b/devel-docs/app/app-sections.txt
@@ -3535,20 +3535,6 @@ gimp_value_dup_int8array
 gimp_value_set_int8array
 gimp_value_set_static_int8array
 gimp_value_take_int8array
-GIMP_TYPE_INT16_ARRAY
-GIMP_VALUE_HOLDS_INT16_ARRAY
-gimp_int16_array_get_type
-GIMP_TYPE_PARAM_INT16_ARRAY
-GIMP_PARAM_SPEC_INT16_ARRAY
-GIMP_IS_PARAM_SPEC_INT16_ARRAY
-GimpParamSpecInt16Array
-gimp_param_int16_array_get_type
-gimp_param_spec_int16_array
-gimp_value_get_int16array
-gimp_value_dup_int16array
-gimp_value_set_int16array
-gimp_value_set_static_int16array
-gimp_value_take_int16array
 GIMP_TYPE_INT32_ARRAY
 GIMP_VALUE_HOLDS_INT32_ARRAY
 gimp_int32_array_get_type
diff --git a/devel-docs/libgimp/libgimp3-sections.txt b/devel-docs/libgimp/libgimp3-sections.txt
index d2642926a7..504af5eed3 100644
--- a/devel-docs/libgimp/libgimp3-sections.txt
+++ b/devel-docs/libgimp/libgimp3-sections.txt
@@ -1089,13 +1089,6 @@ GIMP_VALUES_GET_UINT8_ARRAY
 GIMP_VALUES_DUP_UINT8_ARRAY
 GIMP_VALUES_SET_UINT8_ARRAY
 GIMP_VALUES_TAKE_UINT8_ARRAY
-GIMP_PROC_ARG_INT16_ARRAY
-GIMP_PROC_AUX_ARG_INT16_ARRAY
-GIMP_PROC_VAL_INT16_ARRAY
-GIMP_VALUES_GET_INT16_ARRAY
-GIMP_VALUES_DUP_INT16_ARRAY
-GIMP_VALUES_SET_INT16_ARRAY
-GIMP_VALUES_TAKE_INT16_ARRAY
 GIMP_PROC_ARG_INT32_ARRAY
 GIMP_PROC_AUX_ARG_INT32_ARRAY
 GIMP_PROC_VAL_INT32_ARRAY
diff --git a/devel-docs/libgimpbase/libgimpbase3-sections.txt 
b/devel-docs/libgimpbase/libgimpbase3-sections.txt
index 381ceaf0c6..34d1adbbd1 100644
--- a/devel-docs/libgimpbase/libgimpbase3-sections.txt
+++ b/devel-docs/libgimpbase/libgimpbase3-sections.txt
@@ -299,12 +299,6 @@ gimp_value_dup_uint8_array
 gimp_value_set_uint8_array
 gimp_value_set_static_uint8_array
 gimp_value_take_uint8_array
-gimp_param_spec_int16_array
-gimp_value_get_int16_array
-gimp_value_dup_int16_array
-gimp_value_set_int16_array
-gimp_value_set_static_int16_array
-gimp_value_take_int16_array
 gimp_param_spec_int32_array
 gimp_value_get_int32_array
 gimp_value_dup_int32_array
@@ -346,7 +340,6 @@ gimp_value_take_object_array
 <SUBSECTION Standard>
 GIMP_IS_PARAM_SPEC_ARRAY
 GIMP_IS_PARAM_SPEC_FLOAT_ARRAY
-GIMP_IS_PARAM_SPEC_INT16_ARRAY
 GIMP_IS_PARAM_SPEC_INT32_ARRAY
 GIMP_IS_PARAM_SPEC_OBJECT_ARRAY
 GIMP_IS_PARAM_SPEC_UINT8_ARRAY
@@ -355,7 +348,6 @@ GIMP_IS_PARAM_SPEC_STRING
 GIMP_IS_PARAM_SPEC_STRING_ARRAY
 GIMP_PARAM_SPEC_ARRAY
 GIMP_PARAM_SPEC_FLOAT_ARRAY
-GIMP_PARAM_SPEC_INT16_ARRAY
 GIMP_PARAM_SPEC_INT32_ARRAY
 GIMP_PARAM_SPEC_OBJECT_ARRAY
 GIMP_PARAM_SPEC_UINT8_ARRAY
@@ -364,13 +356,11 @@ GIMP_PARAM_SPEC_STRING
 GIMP_PARAM_SPEC_STRING_ARRAY
 GIMP_TYPE_ARRAY
 GIMP_TYPE_FLOAT_ARRAY
-GIMP_TYPE_INT16_ARRAY
 GIMP_TYPE_INT32_ARRAY
 GIMP_TYPE_OBJECT_ARRAY
 GIMP_TYPE_UINT8_ARRAY
 GIMP_TYPE_PARAM_ARRAY
 GIMP_TYPE_PARAM_FLOAT_ARRAY
-GIMP_TYPE_PARAM_INT16_ARRAY
 GIMP_TYPE_PARAM_INT32_ARRAY
 GIMP_TYPE_PARAM_OBJECT_ARRAY
 GIMP_TYPE_PARAM_UINT8_ARRAY
@@ -381,7 +371,6 @@ GIMP_TYPE_RGB_ARRAY
 GIMP_TYPE_STRING_ARRAY
 GIMP_VALUE_HOLDS_ARRAY
 GIMP_VALUE_HOLDS_FLOAT_ARRAY
-GIMP_VALUE_HOLDS_INT16_ARRAY
 GIMP_VALUE_HOLDS_INT32_ARRAY
 GIMP_VALUE_HOLDS_OBJECT_ARRAY
 GIMP_VALUE_HOLDS_UINT8_ARRAY
@@ -389,7 +378,6 @@ GIMP_VALUE_HOLDS_RGB_ARRAY
 GIMP_VALUE_HOLDS_STRING_ARRAY
 GimpParamSpecArray
 GimpParamSpecFloatArray
-GimpParamSpecInt16Array
 GimpParamSpecInt32Array
 GimpParamSpecObjectArray
 GimpParamSpecUInt8Array
@@ -397,13 +385,11 @@ GimpParamSpecRGBArray
 GimpParamSpecStringArray
 gimp_array_get_type
 gimp_float_array_get_type
-gimp_int16_array_get_type
 gimp_int32_array_get_type
 gimp_object_array_get_type
 gimp_uint8_array_get_type
 gimp_param_array_get_type
 gimp_param_float_array_get_type
-gimp_param_int16_array_get_type
 gimp_param_int32_array_get_type
 gimp_param_object_array_get_type
 gimp_param_uint8_array_get_type
diff --git a/devel-docs/libgimpbase/libgimpbase3.types b/devel-docs/libgimpbase/libgimpbase3.types
index d72b812345..ef0c934d30 100644
--- a/devel-docs/libgimpbase/libgimpbase3.types
+++ b/devel-docs/libgimpbase/libgimpbase3.types
@@ -1,13 +1,11 @@
 gimp_array_get_type
 gimp_float_array_get_type
-gimp_int16_array_get_type
 gimp_int32_array_get_type
 gimp_uint8_array_get_type
 gimp_memsize_get_type
 gimp_metadata_get_type
 gimp_param_array_get_type
 gimp_param_float_array_get_type
-gimp_param_int16_array_get_type
 gimp_param_int32_array_get_type
 gimp_param_uint8_array_get_type
 gimp_param_rgb_array_get_type
diff --git a/libgimp/gimp.c b/libgimp/gimp.c
index f14fbadd4f..0c686efe1f 100644
--- a/libgimp/gimp.c
+++ b/libgimp/gimp.c
@@ -438,7 +438,6 @@ gimp_main (GType  plug_in_type,
 
       GIMP_TYPE_ARRAY,         GIMP_TYPE_PARAM_ARRAY,
       GIMP_TYPE_UINT8_ARRAY,   GIMP_TYPE_PARAM_UINT8_ARRAY,
-      GIMP_TYPE_INT16_ARRAY,   GIMP_TYPE_PARAM_INT16_ARRAY,
       GIMP_TYPE_INT32_ARRAY,   GIMP_TYPE_PARAM_INT32_ARRAY,
       GIMP_TYPE_FLOAT_ARRAY,   GIMP_TYPE_PARAM_FLOAT_ARRAY,
       GIMP_TYPE_STRING_ARRAY,  GIMP_TYPE_PARAM_STRING_ARRAY,
diff --git a/libgimp/gimpgpparams-body.c b/libgimp/gimpgpparams-body.c
index 71468c5522..f79d274dfe 100644
--- a/libgimp/gimpgpparams-body.c
+++ b/libgimp/gimpgpparams-body.c
@@ -41,9 +41,6 @@ _gimp_gp_param_def_to_param_spec (const GPParamDef *param_def)
       if (! strcmp (param_def->type_name, "GimpParamInt32Array"))
         return gimp_param_spec_int32_array (name, nick, blurb, flags);
 
-      if (! strcmp (param_def->type_name, "GimpParamInt16Array"))
-        return gimp_param_spec_int16_array (name, nick, blurb, flags);
-
       if (! strcmp (param_def->type_name, "GimpParamUInt8Array"))
         return gimp_param_spec_uint8_array (name, nick, blurb, flags);
 
@@ -492,13 +489,6 @@ gimp_gp_param_to_value (gpointer        gimp,
                                   param->data.d_array.size /
                                   sizeof (gint32));
     }
-  else if (GIMP_VALUE_HOLDS_INT16_ARRAY (value))
-    {
-      gimp_value_set_int16_array (value,
-                                  (gint16 *) param->data.d_array.data,
-                                  param->data.d_array.size /
-                                  sizeof (gint16));
-    }
   else if (GIMP_VALUE_HOLDS_UINT8_ARRAY (value))
     {
       gimp_value_set_uint8_array (value,
@@ -778,7 +768,6 @@ gimp_value_to_gp_param (const GValue *value,
         }
     }
   else if (GIMP_VALUE_HOLDS_INT32_ARRAY (value) ||
-           GIMP_VALUE_HOLDS_INT16_ARRAY (value) ||
            GIMP_VALUE_HOLDS_UINT8_ARRAY (value) ||
            GIMP_VALUE_HOLDS_FLOAT_ARRAY (value) ||
            GIMP_VALUE_HOLDS_RGB_ARRAY (value))
diff --git a/libgimp/gimpprocedure-params.h b/libgimp/gimpprocedure-params.h
index 085c4adf99..9951c6630f 100644
--- a/libgimp/gimpprocedure-params.h
+++ b/libgimp/gimpprocedure-params.h
@@ -374,36 +374,6 @@ G_BEGIN_DECLS
   gimp_value_take_uint8_array (gimp_value_array_index (args, n), value, length)
 
 
-/*  int16 array  */
-
-#define GIMP_PROC_ARG_INT16_ARRAY(procedure, name, nick, blurb, flags) \
-  gimp_procedure_add_argument (procedure,\
-                               gimp_param_spec_int16_array (name, nick, blurb,\
-                               flags))
-
-#define GIMP_PROC_AUX_ARG_INT16_ARRAY(procedure, name, nick, blurb, flags) \
-  gimp_procedure_add_aux_argument (procedure,\
-                                   gimp_param_spec_int16_array (name, nick, blurb,\
-                                   flags))
-
-#define GIMP_PROC_VAL_INT16_ARRAY(procedure, name, nick, blurb, flags) \
-  gimp_procedure_add_return_value (procedure,\
-                                   gimp_param_spec_int16_array (name, nick, blurb,\
-                                   flags))
-
-#define GIMP_VALUES_GET_INT16_ARRAY(args, n) \
-  gimp_value_get_int16_array (gimp_value_array_index (args, n))
-
-#define GIMP_VALUES_DUP_INT16_ARRAY(args, n) \
-  gimp_value_dup_int16_array (gimp_value_array_index (args, n))
-
-#define GIMP_VALUES_SET_INT16_ARRAY(args, n, value, length) \
-  gimp_value_set_int16_array (gimp_value_array_index (args, n), value, length)
-
-#define GIMP_VALUES_TAKE_INT16_ARRAY(args, n, value, length) \
-  gimp_value_take_int16_array (gimp_value_array_index (args, n), value, length)
-
-
 /*  int32 array  */
 
 #define GIMP_PROC_ARG_INT32_ARRAY(procedure, name, nick, blurb, flags) \
diff --git a/libgimpbase/gimpbase.def b/libgimpbase/gimpbase.def
index f1ceead442..2a0e51ccf6 100644
--- a/libgimpbase/gimpbase.def
+++ b/libgimpbase/gimpbase.def
@@ -64,7 +64,6 @@ EXPORTS
        gimp_ink_blob_type_get_type
        gimp_installation_directory
        gimp_installation_directory_file
-       gimp_int16_array_get_type
        gimp_int32_array_get_type
        gimp_interpolation_type_get_type
        gimp_is_canonical_identifier
@@ -108,7 +107,6 @@ EXPORTS
        gimp_paint_application_mode_get_type
        gimp_param_array_get_type
        gimp_param_float_array_get_type
-       gimp_param_int16_array_get_type
        gimp_param_int32_array_get_type
        gimp_param_memsize_get_type
        gimp_param_object_array_get_type
@@ -116,7 +114,6 @@ EXPORTS
        gimp_param_rgb_array_get_type
        gimp_param_spec_array
        gimp_param_spec_float_array
-       gimp_param_spec_int16_array
        gimp_param_spec_int32_array
        gimp_param_spec_memsize
        gimp_param_spec_object_array
@@ -227,26 +224,22 @@ EXPORTS
        gimp_value_array_truncate
        gimp_value_array_unref
        gimp_value_dup_float_array
-       gimp_value_dup_int16_array
        gimp_value_dup_int32_array
        gimp_value_dup_object_array
        gimp_value_dup_rgb_array
        gimp_value_dup_string_array
        gimp_value_dup_uint8_array
        gimp_value_get_float_array
-       gimp_value_get_int16_array
        gimp_value_get_int32_array
        gimp_value_get_object_array
        gimp_value_get_rgb_array
        gimp_value_get_string_array
        gimp_value_get_uint8_array
        gimp_value_set_float_array
-       gimp_value_set_int16_array
        gimp_value_set_int32_array
        gimp_value_set_object_array
        gimp_value_set_rgb_array
        gimp_value_set_static_float_array
-       gimp_value_set_static_int16_array
        gimp_value_set_static_int32_array
        gimp_value_set_static_object_array
        gimp_value_set_static_rgb_array
@@ -255,7 +248,6 @@ EXPORTS
        gimp_value_set_string_array
        gimp_value_set_uint8_array
        gimp_value_take_float_array
-       gimp_value_take_int16_array
        gimp_value_take_int32_array
        gimp_value_take_object_array
        gimp_value_take_rgb_array
diff --git a/libgimpbase/gimpparamspecs.c b/libgimpbase/gimpparamspecs.c
index 281715dcfd..90b73ec31f 100644
--- a/libgimpbase/gimpparamspecs.c
+++ b/libgimpbase/gimpparamspecs.c
@@ -421,177 +421,6 @@ gimp_value_take_uint8_array (GValue *value,
 }
 
 
-/*
- * GIMP_TYPE_INT16_ARRAY
- */
-
-typedef GimpArray GimpInt16Array;
-G_DEFINE_BOXED_TYPE (GimpInt16Array, gimp_int16_array, gimp_array_copy, gimp_array_free)
-
-
-/*
- * GIMP_TYPE_PARAM_INT16_ARRAY
- */
-
-static void   gimp_param_int16_array_class_init (GParamSpecClass *klass);
-static void   gimp_param_int16_array_init       (GParamSpec      *pspec);
-
-GType
-gimp_param_int16_array_get_type (void)
-{
-  static GType type = 0;
-
-  if (! type)
-    {
-      const GTypeInfo info =
-      {
-        sizeof (GParamSpecClass),
-        NULL, NULL,
-        (GClassInitFunc) gimp_param_int16_array_class_init,
-        NULL, NULL,
-        sizeof (GimpParamSpecInt16Array),
-        0,
-        (GInstanceInitFunc) gimp_param_int16_array_init
-      };
-
-      type = g_type_register_static (GIMP_TYPE_PARAM_ARRAY,
-                                     "GimpParamInt16Array", &info, 0);
-    }
-
-  return type;
-}
-
-static void
-gimp_param_int16_array_class_init (GParamSpecClass *klass)
-{
-  klass->value_type = GIMP_TYPE_INT16_ARRAY;
-}
-
-static void
-gimp_param_int16_array_init (GParamSpec *pspec)
-{
-}
-
-/**
- * gimp_param_spec_int16_array:
- * @name:  Canonical name of the property specified.
- * @nick:  Nick name of the property specified.
- * @blurb: Description of the property specified.
- * @flags: Flags for the property specified.
- *
- * Creates a new #GimpParamSpecInt16Array specifying a
- * #GIMP_TYPE_INT16_ARRAY property.
- *
- * See g_param_spec_internal() for details on property names.
- *
- * Returns: (transfer full): The newly created #GimpParamSpecInt16Array.
- *
- * Since: 3.0
- **/
-GParamSpec *
-gimp_param_spec_int16_array (const gchar *name,
-                             const gchar *nick,
-                             const gchar *blurb,
-                             GParamFlags  flags)
-{
-  GimpParamSpecArray *array_spec;
-
-  array_spec = g_param_spec_internal (GIMP_TYPE_PARAM_INT16_ARRAY,
-                                      name, nick, blurb, flags);
-
-  return G_PARAM_SPEC (array_spec);
-}
-
-/**
- * gimp_value_get_int16_array:
- * @value: A valid value of type %GIMP_TYPE_INT16_ARRAY
- *
- * Gets the contents of a %GIMP_TYPE_INT16_ARRAY #GValue
- *
- * Returns: (transfer none) (array): The contents of @value
- */
-const gint16 *
-gimp_value_get_int16_array (const GValue *value)
-{
-  g_return_val_if_fail (GIMP_VALUE_HOLDS_INT16_ARRAY (value), NULL);
-
-  return (const gint16 *) gimp_value_get_array (value);
-}
-
-/**
- * gimp_value_dup_int16_array:
- * @value: A valid value of type %GIMP_TYPE_INT16_ARRAY
- *
- * Gets the contents of a %GIMP_TYPE_INT16_ARRAY #GValue
- *
- * Returns: (transfer full) (array): The contents of @value
- */
-gint16 *
-gimp_value_dup_int16_array (const GValue *value)
-{
-  g_return_val_if_fail (GIMP_VALUE_HOLDS_INT16_ARRAY (value), NULL);
-
-  return (gint16 *) gimp_value_dup_array (value);
-}
-
-/**
- * gimp_value_set_int16_array:
- * @value: A valid value of type %GIMP_TYPE_INT16_ARRAY
- * @data: (array length=length): A #gint16 array
- * @length: The number of elements in @data
- *
- * Sets the contents of @value to @data.
- */
-void
-gimp_value_set_int16_array (GValue       *value,
-                            const gint16 *data,
-                            gsize         length)
-{
-  g_return_if_fail (GIMP_VALUE_HOLDS_INT16_ARRAY (value));
-
-  gimp_value_set_array (value, (const guint8 *) data,
-                        length * sizeof (gint16));
-}
-
-/**
- * gimp_value_set_static_int16_array:
- * @value: A valid value of type %GIMP_TYPE_INT16_ARRAY
- * @data: (array length=length): A #gint16 array
- * @length: The number of elements in @data
- *
- * Sets the contents of @value to @data, without copying the data.
- */
-void
-gimp_value_set_static_int16_array (GValue       *value,
-                                   const gint16 *data,
-                                   gsize         length)
-{
-  g_return_if_fail (GIMP_VALUE_HOLDS_INT16_ARRAY (value));
-
-  gimp_value_set_static_array (value, (const guint8 *) data,
-                               length * sizeof (gint16));
-}
-
-/**
- * gimp_value_take_int16_array:
- * @value: A valid value of type %GIMP_TYPE_INT16_ARRAY
- * @data: (transfer full) (array length=length): A #gint16 array
- * @length: The number of elements in @data
- *
- * Sets the contents of @value to @data, and takes ownership of @data.
- */
-void
-gimp_value_take_int16_array (GValue *value,
-                             gint16 *data,
-                             gsize   length)
-{
-  g_return_if_fail (GIMP_VALUE_HOLDS_INT16_ARRAY (value));
-
-  gimp_value_take_array (value, (guint8 *) data,
-                         length * sizeof (gint16));
-}
-
-
 /*
  * GIMP_TYPE_INT32_ARRAY
  */
diff --git a/libgimpbase/gimpparamspecs.h b/libgimpbase/gimpparamspecs.h
index 6a0ab225d3..1da87c380c 100644
--- a/libgimpbase/gimpparamspecs.h
+++ b/libgimpbase/gimpparamspecs.h
@@ -173,51 +173,6 @@ void           gimp_value_take_uint8_array       (GValue       *value,
                                                   gsize         length);
 
 
-/*
- * GIMP_TYPE_INT16_ARRAY
- */
-
-#define GIMP_TYPE_INT16_ARRAY               (gimp_int16_array_get_type ())
-#define GIMP_VALUE_HOLDS_INT16_ARRAY(value) (G_TYPE_CHECK_VALUE_TYPE ((value), GIMP_TYPE_INT16_ARRAY))
-
-GType   gimp_int16_array_get_type           (void) G_GNUC_CONST;
-
-
-/*
- * GIMP_TYPE_PARAM_INT16_ARRAY
- */
-
-#define GIMP_TYPE_PARAM_INT16_ARRAY           (gimp_param_int16_array_get_type ())
-#define GIMP_PARAM_SPEC_INT16_ARRAY(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), 
GIMP_TYPE_PARAM_INT16_ARRAY, GimpParamSpecInt16Array))
-#define GIMP_IS_PARAM_SPEC_INT16_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), 
GIMP_TYPE_PARAM_INT16_ARRAY))
-
-typedef struct _GimpParamSpecInt16Array GimpParamSpecInt16Array;
-
-struct _GimpParamSpecInt16Array
-{
-  GimpParamSpecArray parent_instance;
-};
-
-GType          gimp_param_int16_array_get_type   (void) G_GNUC_CONST;
-
-GParamSpec   * gimp_param_spec_int16_array       (const gchar  *name,
-                                                  const gchar  *nick,
-                                                  const gchar  *blurb,
-                                                  GParamFlags   flags);
-
-const gint16 * gimp_value_get_int16_array        (const GValue *value);
-gint16       * gimp_value_dup_int16_array        (const GValue *value);
-void           gimp_value_set_int16_array        (GValue       *value,
-                                                  const gint16 *data,
-                                                  gsize         length);
-void           gimp_value_set_static_int16_array (GValue       *value,
-                                                  const gint16 *data,
-                                                  gsize         length);
-void           gimp_value_take_int16_array       (GValue       *value,
-                                                  gint16       *data,
-                                                  gsize         length);
-
-
 /*
  * GIMP_TYPE_INT32_ARRAY
  */
diff --git a/libgimpconfig/gimpconfig-params.c b/libgimpconfig/gimpconfig-params.c
index ee85eb8910..861be8ccf5 100644
--- a/libgimpconfig/gimpconfig-params.c
+++ b/libgimpconfig/gimpconfig-params.c
@@ -295,11 +295,6 @@ gimp_config_param_spec_duplicate (GParamSpec *pspec)
           copy = gimp_param_spec_uint8_array (name, nick, blurb,
                                               flags);
         }
-      else if (GIMP_IS_PARAM_SPEC_INT16_ARRAY (pspec))
-        {
-          copy = gimp_param_spec_int16_array (name, nick, blurb,
-                                              flags);
-        }
       else if (GIMP_IS_PARAM_SPEC_INT32_ARRAY (pspec))
         {
           copy = gimp_param_spec_int32_array (name, nick, blurb,
diff --git a/pdb/app.pl b/pdb/app.pl
index 6d48b3c29c..3f2252a2bc 100644
--- a/pdb/app.pl
+++ b/pdb/app.pl
@@ -544,14 +544,6 @@ gimp_param_spec_int32_array ("$name",
                              "$nick",
                              "$blurb",
                              $flags)
-CODE
-    }
-    elsif ($pdbtype eq 'int16array') {
-       $pspec = <<CODE;
-gimp_param_spec_int16_array ("$name",
-                             "$nick",
-                             "$blurb",
-                             $flags)
 CODE
     }
     elsif ($pdbtype eq 'int8array') {
diff --git a/pdb/pdb.pl b/pdb/pdb.pl
index 5b76d94b26..ffa17b9869 100644
--- a/pdb/pdb.pl
+++ b/pdb/pdb.pl
@@ -71,19 +71,6 @@ package Gimp::CodeGen::pdb;
                     set_value_func  => 'gimp_value_set_int32_array ($value, $var, $var_len)',
                     take_value_func => 'gimp_value_take_int32_array ($value, $var, $var_len)' },
 
-    int16array  => { name            => 'INT16ARRAY',
-                    gtype           => 'GIMP_TYPE_INT16_ARRAY',
-                    type            => 'gint16 *',
-                    const_type      => 'const gint16 *',
-                    array           => 1,
-                    init_value      => 'NULL',
-                    in_annotate     => '(element-type gint16)',
-                    out_annotate    => '(element-type gint16) (transfer full)',
-                    get_value_func  => '$var = gimp_value_get_int16_array ($value)',
-                    dup_value_func  => '$var = GIMP_VALUES_DUP_INT16_ARRAY ($value)',
-                    set_value_func  => 'gimp_value_set_int16_array ($value, $var, $var_len)',
-                    take_value_func => 'gimp_value_take_int16_array ($value, $var, $var_len)' },
-
     int8array   => { name            => 'INT8ARRAY',
                     gtype           => 'GIMP_TYPE_UINT8_ARRAY',
                     type            => 'guint8 *',
diff --git a/plug-ins/script-fu/scheme-wrapper.c b/plug-ins/script-fu/scheme-wrapper.c
index dd8992cf29..1388649259 100644
--- a/plug-ins/script-fu/scheme-wrapper.c
+++ b/plug-ins/script-fu/scheme-wrapper.c
@@ -918,64 +918,6 @@ script_fu_marshal_procedure_call (scheme   *sc,
                     g_printerr ("\n");
                   }
               }
-#endif
-            }
-        }
-      else if (GIMP_VALUE_HOLDS_INT16_ARRAY (&value))
-        {
-          vector = sc->vptr->pair_car (a);
-          if (! sc->vptr->is_vector (vector))
-            success = FALSE;
-
-          if (success)
-            {
-              gint16 *array;
-
-              n_elements = GIMP_VALUES_GET_INT (args, i - 1);
-
-              if (n_elements < 0 ||
-                  n_elements > sc->vptr->vector_length (vector))
-                {
-                  g_snprintf (error_str, sizeof (error_str),
-                              "INT16 vector (argument %d) for function %s has "
-                              "size of %ld but expected size of %d",
-                              i+1, proc_name, sc->vptr->vector_length (vector), n_elements);
-                  return foreign_error (sc, error_str, 0);
-                }
-
-              array = g_new0 (gint16, n_elements);
-
-              for (j = 0; j < n_elements; j++)
-                {
-                  pointer v_element = sc->vptr->vector_elem (vector, j);
-
-                  if (! sc->vptr->is_number (v_element))
-                    {
-                      g_snprintf (error_str, sizeof (error_str),
-                                  "Item %d in vector is not a number (argument %d for function %s)",
-                                  j+1, i+1, proc_name);
-                      g_free (array);
-                      return foreign_error (sc, error_str, vector);
-                    }
-
-                  array[j] = (gint16) sc->vptr->ivalue (v_element);
-                }
-
-              gimp_value_take_int16_array (&value, array, n_elements);
-
-#if DEBUG_MARSHALL
-              {
-                glong count = sc->vptr->vector_length (vector);
-                g_printerr ("      int16 vector has %ld elements\n", count);
-                if (count > 0)
-                  {
-                    g_printerr ("     ");
-                    for (j = 0; j < count; ++j)
-                      g_printerr (" %ld",
-                                  sc->vptr->ivalue ( sc->vptr->vector_elem (vector, j) ));
-                    g_printerr ("\n");
-                  }
-              }
 #endif
             }
         }
@@ -1543,20 +1485,6 @@ script_fu_marshal_procedure_call (scheme   *sc,
               const gint32 *v      = gimp_value_get_int32_array (value);
               pointer       vector = sc->vptr->mk_vector (sc, n);
 
-              for (j = 0; j < n; j++)
-                {
-                  sc->vptr->set_vector_elem (vector, j,
-                                             sc->vptr->mk_integer (sc, v[j]));
-                }
-
-              return_val = sc->vptr->cons (sc, vector, return_val);
-            }
-          else if (GIMP_VALUE_HOLDS_INT16_ARRAY (value))
-            {
-              gint32        n      = GIMP_VALUES_GET_INT (values, i);
-              const gint16 *v      = gimp_value_get_int16_array (value);
-              pointer       vector = sc->vptr->mk_vector (sc, n);
-
               for (j = 0; j < n; j++)
                 {
                   sc->vptr->set_vector_elem (vector, j,


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