Merge branch '1.1'
[jansson.git] / src / value.c
index 1982b90..ccf9f06 100644 (file)
@@ -229,7 +229,7 @@ json_t *json_array(void)
 {
     json_array_t *array = malloc(sizeof(json_array_t));
     if(!array)
-      return NULL;
+        return NULL;
     json_init(&array->json, JSON_ARRAY);
 
     array->entries = 0;
@@ -480,7 +480,7 @@ json_t *json_string_nocheck(const char *value)
 
     string = malloc(sizeof(json_string_t));
     if(!string)
-       return NULL;
+        return NULL;
     json_init(&string->json, JSON_STRING);
 
     string->value = strdup(value);
@@ -508,7 +508,7 @@ const char *json_string_value(const json_t *json)
     return json_to_string(json)->value;
 }
 
-int json_string_set(const json_t *json, const char *value)
+int json_string_set(json_t *json, const char *value)
 {
     char *dup;
     json_string_t *string;
@@ -540,7 +540,7 @@ json_t *json_integer(int value)
 {
     json_integer_t *integer = malloc(sizeof(json_integer_t));
     if(!integer)
-       return NULL;
+        return NULL;
     json_init(&integer->json, JSON_INTEGER);
 
     integer->value = value;
@@ -555,7 +555,7 @@ int json_integer_value(const json_t *json)
     return json_to_integer(json)->value;
 }
 
-int json_integer_set(const json_t *json, int value)
+int json_integer_set(json_t *json, int value)
 {
     if(!json_is_integer(json))
         return -1;
@@ -577,7 +577,7 @@ json_t *json_real(double value)
 {
     json_real_t *real = malloc(sizeof(json_real_t));
     if(!real)
-       return NULL;
+        return NULL;
     json_init(&real->json, JSON_REAL);
 
     real->value = value;
@@ -592,7 +592,7 @@ double json_real_value(const json_t *json)
     return json_to_real(json)->value;
 }
 
-int json_real_set(const json_t *json, double value)
+int json_real_set(json_t *json, double value)
 {
     if(!json_is_real(json))
         return 0;