emacs-devel
[Top][All Lists]
Advanced

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

Re: I created a faster JSON parser


From: Collin Funk
Subject: Re: I created a faster JSON parser
Date: Fri, 8 Mar 2024 06:24:12 -0800
User-agent: Mozilla Thunderbird

Hello,

On 3/8/24 6:10 AM, Eli Zaretskii wrote:
>  . The code which handles integers seems to assume that 'unsigned long'
>    is a 64-bit type? if so, this is not true on Windows; please see how
>    we handle this elsewhere in Emacs, in particular in the
>    WIDE_EMACS_INT case.

I noticed this in 'my_json_parse_number' as well. Another change that
would be nice there is using ckd_add and ckd_mul from stdckdint.h,
generated from lib/stdckdint.in.h, to check for integer overflows.
Less room for errors compared to checking manually and easier to read.

Collin



reply via email to

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