diff options
author | Petri Lehtinen <petri@digip.org> | 2009-12-21 14:01:59 +0200 |
---|---|---|
committer | Petri Lehtinen <petri@digip.org> | 2009-12-21 14:12:06 +0200 |
commit | f5202bedef766b68141e20bba3489b4a3aebaf3d (patch) | |
tree | 688534d52ca5ff15e80267ffc1ebc959453a93d8 /src | |
parent | 34fb97998cfeb4ae6f4bc9450c9144bd7572c1f6 (diff) | |
download | jansson-f5202bedef766b68141e20bba3489b4a3aebaf3d.zip jansson-f5202bedef766b68141e20bba3489b4a3aebaf3d.tar.gz jansson-f5202bedef766b68141e20bba3489b4a3aebaf3d.tar.bz2 |
Remove const qualifier from the json_t parameter in json_*_set() functions.
It's incorrect as these functions modify the value.
Diffstat (limited to 'src')
-rw-r--r-- | src/jansson.h | 6 | ||||
-rw-r--r-- | src/value.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/jansson.h b/src/jansson.h index ac6736f..28401b4 100644 --- a/src/jansson.h +++ b/src/jansson.h @@ -123,9 +123,9 @@ int json_integer_value(const json_t *integer); double json_real_value(const json_t *real); double json_number_value(const json_t *json); -int json_string_set(const json_t *string, const char *value); -int json_integer_set(const json_t *integer, int value); -int json_real_set(const json_t *real, double value); +int json_string_set(json_t *string, const char *value); +int json_integer_set(json_t *integer, int value); +int json_real_set(json_t *real, double value); /* loading, printing */ diff --git a/src/value.c b/src/value.c index 6497f85..ccf9f06 100644 --- a/src/value.c +++ b/src/value.c @@ -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; @@ -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; @@ -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; |