aboutsummaryrefslogtreecommitdiffstats
path: root/src/json.c
diff options
context:
space:
mode:
authorEli Zaretskii2017-12-14 19:53:58 +0200
committerEli Zaretskii2017-12-14 19:53:58 +0200
commit8e13d3ab1a31c3f5aee19ee7a92ddaed5fc3eb2d (patch)
treef8178b89e990006662a2fe81fea40c25811ba180 /src/json.c
parent57e2ca5c504fda014ba1971e850a26ef001a7bfd (diff)
downloademacs-8e13d3ab1a31c3f5aee19ee7a92ddaed5fc3eb2d.tar.gz
emacs-8e13d3ab1a31c3f5aee19ee7a92ddaed5fc3eb2d.zip
; * src/json.c: Convert non-ASCII quotes to ASCII characters.
Diffstat (limited to 'src/json.c')
-rw-r--r--src/json.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/json.c b/src/json.c
index 7025ae165cd..72ca93f621b 100644
--- a/src/json.c
+++ b/src/json.c
@@ -151,8 +151,8 @@ init_json_functions (void)
151#endif /* WINDOWSNT */ 151#endif /* WINDOWSNT */
152 152
153/* We install a custom allocator so that we can avoid objects larger 153/* We install a custom allocator so that we can avoid objects larger
154 than PTRDIFF_MAX. Such objects wouldnt play well with the rest of 154 than PTRDIFF_MAX. Such objects wouldn't play well with the rest of
155 Emacss codebase, which generally uses ptrdiff_t for sizes and 155 Emacs's codebase, which generally uses ptrdiff_t for sizes and
156 indices. The other functions in this file also generally assume 156 indices. The other functions in this file also generally assume
157 that size_t values never exceed PTRDIFF_MAX. */ 157 that size_t values never exceed PTRDIFF_MAX. */
158 158
@@ -324,7 +324,7 @@ lisp_to_json_toplevel_1 (Lisp_Object lisp, json_t **json)
324 if (!NILP (HASH_HASH (h, i))) 324 if (!NILP (HASH_HASH (h, i)))
325 { 325 {
326 Lisp_Object key = json_encode (HASH_KEY (h, i)); 326 Lisp_Object key = json_encode (HASH_KEY (h, i));
327 /* We cant specify the length, so the string must be 327 /* We can't specify the length, so the string must be
328 null-terminated. */ 328 null-terminated. */
329 check_string_without_embedded_nulls (key); 329 check_string_without_embedded_nulls (key);
330 int status = json_object_set_new (*json, SSDATA (key), 330 int status = json_object_set_new (*json, SSDATA (key),
@@ -565,7 +565,7 @@ json_to_lisp (json_t *json)
565 Lisp_Object key = json_build_string (key_str); 565 Lisp_Object key = json_build_string (key_str);
566 EMACS_UINT hash; 566 EMACS_UINT hash;
567 ptrdiff_t i = hash_lookup (h, key, &hash); 567 ptrdiff_t i = hash_lookup (h, key, &hash);
568 /* Keys in JSON objects are unique, so the key cant be 568 /* Keys in JSON objects are unique, so the key can't be
569 present yet. */ 569 present yet. */
570 eassert (i < 0); 570 eassert (i < 0);
571 hash_put (h, key, json_to_lisp (value), hash); 571 hash_put (h, key, json_to_lisp (value), hash);
@@ -574,7 +574,7 @@ json_to_lisp (json_t *json)
574 return result; 574 return result;
575 } 575 }
576 } 576 }
577 /* Cant get here. */ 577 /* Can't get here. */
578 emacs_abort (); 578 emacs_abort ();
579} 579}
580 580
@@ -696,7 +696,7 @@ not moved. */)
696 return unbind_to (count, lisp); 696 return unbind_to (count, lisp);
697} 697}
698 698
699/* Simplified version of define-error that works with pure 699/* Simplified version of 'define-error' that works with pure
700 objects. */ 700 objects. */
701 701
702static void 702static void