summaryrefslogtreecommitdiff
path: root/xs_json.h
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-08-09 15:54:36 +0200
committerdefault <nobody@localhost>2023-08-09 15:54:36 +0200
commit912cfb5aaa915829efe92cc34ad7ad888e93c14a (patch)
tree350744e7907f318c8dac42dc72cc9940a2f9ed74 /xs_json.h
parent18976dc6b8c1ee65056444fa6ac8b11541caa5dd (diff)
Backport from xs.
Diffstat (limited to 'xs_json.h')
-rw-r--r--xs_json.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/xs_json.h b/xs_json.h
index b8b6b3a..368e5d6 100644
--- a/xs_json.h
+++ b/xs_json.h
@@ -189,8 +189,7 @@ typedef enum {
JS_COLON,
JS_VALUE,
JS_STRING,
- JS_INTEGER,
- JS_REAL,
+ JS_NUMBER,
JS_TRUE,
JS_FALSE,
JS_NULL,
@@ -287,7 +286,7 @@ static xs_val *_xs_json_load_lexer(FILE *f, js_type *t)
ungetc(c, f);
if (fscanf(f, "%lf", &d) == 1) {
- *t = JS_REAL;
+ *t = JS_NUMBER;
v = xs_number_new(d);
}
}