emacs-devel
[Top][All Lists]
Advanced

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

Re: How to add pseudo vector types


From: Eli Zaretskii
Subject: Re: How to add pseudo vector types
Date: Sat, 24 Jul 2021 08:52:42 +0300

> Date: Fri, 23 Jul 2021 16:01:14 -0400
> From: "Perry E. Metzger" <perry@piermont.com>
> 
> On 7/23/21 15:10, Eli Zaretskii wrote:
> 
> >> Abort, it seems:
> >> static inline void *ts_malloc_default(size_t size) {
> >>    void *result = malloc(size);
> >>    if (size > 0 && !result) {
> >>      fprintf(stderr, "tree-sitter failed to allocate %zu bytes", size);
> >>      exit(1);
> >>    }
> >>    return result;
> >> }
> > We must replace this function, if only because the MS-Windows build of
> > Emacs uses a custom malloc implementation.  Does TS allow the client
> > to use its own malloc?
> 
> Certainly more graceful allocation error behavior would be necessary in 
> an Emacs context even on Unix-like operating systems. An unexpected hard 
> exit could result in loss of data for the user.

Sure, which is why this must be replaced.



reply via email to

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