emacs-devel
[Top][All Lists]
Advanced

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

Re: Dynamic loading progress


From: Philipp Stephani
Subject: Re: Dynamic loading progress
Date: Thu, 15 Oct 2015 00:25:50 +0000



Aurélien Aptel <address@hidden> schrieb am Do., 15. Okt. 2015 um 01:48 Uhr:
On Thu, Oct 15, 2015 at 12:25 AM, Philipp Stephani
<address@hidden> wrote:
> static Lisp_Object value_to_lisp (emacs_value value) {
>   return value->v;
> }
>
> static emacs_value lisp_to_value (Lisp_Object object) {
>   emacs_value v = (emacs_value) malloc(sizeof v);
>   // The allocation needs to be smarter, this example leaks memory.
>   if (!v) return 0;
>   v->v = object;
>   return v;
> }

I'm not a big fan of a dynamically allocating memory for each
conversion, it's too expensive. Daniel solution seems more manageable.

Agreed. I've implemented Daniel's suggestion on the tls-error branch, it seems to work fine (but note that environments are now no longer global, so storing away emacs_values without global references now will lead to undefined behavior).
 

By the way, I've merged your tls-errors branch in mine.

Cool, thanks!
 
But the API
doesn't have an unsafe funcall iiuc. That's fine with me but Stefan
was insistent on that.

Let's see what will get accepted upstream. 

reply via email to

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