diff options
author | Eli Zaretskii <eliz@gnu.org> | 2018-10-13 10:13:10 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2018-10-13 10:13:10 +0300 |
commit | 95f69e7db235ca450a17c5a24680b742dfdf9aae (patch) | |
tree | c186902d218c8fca88d3379f84f26738cdfc9fc5 /lisp/net/sieve-mode.el | |
parent | 6cf4dfe472650b3396d2f2592726621a43896de3 (diff) | |
download | emacs-95f69e7db235ca450a17c5a24680b742dfdf9aae.tar.gz emacs-95f69e7db235ca450a17c5a24680b742dfdf9aae.tar.bz2 emacs-95f69e7db235ca450a17c5a24680b742dfdf9aae.zip |
Improve 'json-insert' so it doesn't cons a string from JSON
* src/json.c (struct json_buffer_and_size): New member
inserted_bytes.
(json_insert): Instead of creating a string and inserting it
into the current buffer, copy the unibyte text into the gap.
(struct json_insert_data): New member inserted_bytes.
(json_insert_callback): Update commentary. Pass the
inserted_bytes value to json_insert and on its return copy the
updated value back into DATA.
(Fjson_insert): Decode the unibyte text inserted into the gap.
Call before-change-functions and after-change-functions only
once, before and after processing the insertion of the entire
JSON representation.
* test/src/json-tests.el (json-insert/throw): Adapt to the
modified implementation of json-insert: it no longer calls the
modification hooks once for each inserted chunk of JSON
representation.
Diffstat (limited to 'lisp/net/sieve-mode.el')
0 files changed, 0 insertions, 0 deletions