emacs-devel
[Top][All Lists]
Advanced

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

Re: extract_data_from_object considered dangerous


From: Eli Zaretskii
Subject: Re: extract_data_from_object considered dangerous
Date: Sun, 22 Sep 2019 19:50:30 +0300

> From: Stefan Monnier <address@hidden>
> Date: Sun, 22 Sep 2019 09:39:54 -0400
> 
>     It returns a char* into a Lisp_Object without associating it with
>     any specific Lisp_Object
> 
> In some cases, the Lisp_Object into which the result points is freshly
> allocated during the call, so once we return from the function, there is
> no Lisp_Object reference to it anywhere any more to keep it from
> being GC'd.

The original idea was to use the pointer right away, so that GC
couldn't happen.  If we want to lift this restriction, I think the
function should return a Lisp object, not a char *.



reply via email to

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