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: Paul Eggert
Subject: Re: JSON/YAML/TOML/etc. parsing performance
Date: Tue, 3 Oct 2017 23:41:41 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

Eli Zaretskii wrote:
I'd prefer to have such tests inside 'insert' and its subroutines, or
to tweak the argument passed to 'insert' to have the existing checks
catch the problem.  Can we do that, please?  It doesn't feel right to
me to have this kind of checks in application C code.

There is no universal C integer type, so this doesn't sound doable in general. Even intmax_t is not wide enough, as it doesn't subsume uintmax_t. And I wouldn't want APIs to switch to intmax_t or uintmax_t merely because some library's types don't match ours; the responsibility for passing arguments correctly and for checking for any out-of-range values belongs to the glue code, not to Emacs internals.



reply via email to

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