emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JSON/YAML/TOML/etc. parsing performance


From: Eli Zaretskii
Subject: Re: JSON/YAML/TOML/etc. parsing performance
Date: Sun, 01 Oct 2017 21:38:18 +0300

> From: Philipp Stephani <address@hidden>
> Date: Sat, 30 Sep 2017 22:02:55 +0000
> Cc: address@hidden

One more comment:

> +static Lisp_Object
> +json_insert (void *data)
> +{
> +  const struct json_buffer_and_size *buffer_and_size = data;
> +  if (buffer_and_size->size > PTRDIFF_MAX)
> +    xsignal1 (Qoverflow_error, build_string ("buffer too large"));
> +  insert (buffer_and_size->buffer, buffer_and_size->size);
> +  return Qnil;

Shouldn't we follow the call to 'insert' with decode_from_gap, or do
it before json_insert_callback returns?  Or do we trust Jansson to
produce 100% valid UTF-8?

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]