[gimp] Revert "libgimpbase: fix/improve docs/annotations."



commit 17eb4c551f4a1a6018cc7791f50dbbb14bd0834c
Author: Jehan <jehan girinstud io>
Date:   Mon Aug 5 23:15:07 2019 +0200

    Revert "libgimpbase: fix/improve docs/annotations."
    
    This partly reverts commit d999248d701a656c74d516535881fe3685d5e4aa.
    
    The GimpStringArray is still very weirdly handled, in particular
    regarding the difference of processing with static_data set or not.
    Still this g_return_val_if_fail() was making more problems. It may come
    back but will need more coding to handle the side effects.

 libgimpbase/gimpparamspecs.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/libgimpbase/gimpparamspecs.c b/libgimpbase/gimpparamspecs.c
index 3a3ca345a3..980688e424 100644
--- a/libgimpbase/gimpparamspecs.c
+++ b/libgimpbase/gimpparamspecs.c
@@ -1328,8 +1328,7 @@ gimp_value_take_float_array (GValue  *value,
  *
  * Creates a new #GimpArray containing string data, of size @length.
  *
- * If @static_data is %TRUE, @data is used as-is and should also be
- * NULL-terminated.
+ * If @static_data is %TRUE, @data is used as-is.
  *
  * If @static_data is %FALSE, the string and array will be re-allocated,
  * hence you are expected to free your input data after.
@@ -1345,8 +1344,6 @@ gimp_string_array_new (const gchar **data,
 
   g_return_val_if_fail ((data == NULL && length == 0) ||
                         (data != NULL && length  > 0), NULL);
-  g_return_val_if_fail (! static_data || ! data ||
-                        g_strv_length (data) == length, NULL);
 
   array = g_slice_new0 (GimpArray);
 
@@ -1569,7 +1566,7 @@ gimp_value_get_string_array (const GValue *value)
  * gimp_value_dup_string_array:
  * @value: a #GValue holding a string #GimpArray.
  *
- * Returns: (transfer full)  (array zero-terminated=1): a deep copy of the array of strings.
+ * Returns: (transfer full) (array zero-terminated=1): a deep copy of the array of strings.
  */
 gchar **
 gimp_value_dup_string_array (const GValue *value)


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