[json-glib] array: Relax preconditions on array and object methods



commit cce1435c280dbf63b0dbb8c9176e062c539aa9f9
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Fri Oct 26 11:04:47 2012 +0100

    array: Relax preconditions on array and object methods
    
    Similarly to what we did for the add_string_element(), we need to relax
    the preconditions for add_array_element() and add_object_element().

 json-glib/json-array.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
---
diff --git a/json-glib/json-array.c b/json-glib/json-array.c
index f9d641e..3d5e47f 100644
--- a/json-glib/json-array.c
+++ b/json-glib/json-array.c
@@ -609,7 +609,6 @@ json_array_add_array_element (JsonArray *array,
   JsonNode *node;
 
   g_return_if_fail (array != NULL);
-  g_return_if_fail (value != NULL);
 
   if (value != NULL)
     {
@@ -641,7 +640,6 @@ json_array_add_object_element (JsonArray  *array,
   JsonNode *node;
 
   g_return_if_fail (array != NULL);
-  g_return_if_fail (value != NULL);
 
   if (value != NULL)
     {



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