emacs-devel
[Top][All Lists]
Advanced

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

Re: Dynamic loading progress


From: Aurélien Aptel
Subject: Re: Dynamic loading progress
Date: Sun, 13 Sep 2015 01:11:45 +0200

On Sat, Sep 12, 2015 at 10:42 PM, Stefan Monnier
<address@hidden> wrote:
> Can you give us more details about you mean by the above.
> Are you talking about how to handle things like calls to Fsignal, or to
> Fthrow, or how to provide access to unwind-protect and condition-case in
> to the module's?

The case where a module calls an emacs function that ends up calling
signal/error. I don't know enough about how signaling and
unwind-protect work. It's just black stack magic for me right now :)

I think we just need to implement funcall (from the module API) like this:

    global error = 0

    module_funcall(fun, args):
        // wrap (protect?) this with the right code
        // - to keep the control
        // - set ret to nil and error to 1 in case of error
        ret = Ffuncall(fun, args)

        return ret

The error is accessible via error_get(), error_clear() and
error_check() in the module API. error_get() is currently redundant
with error_check() unless we decide to return detailed errors.

I didn't think about the case where a module calls Fthrow but my guess
is it will just work. I have to test thoroughly what I have already
anyway, I'll see if it works.

> Indeed it's not guaranteed at all.  It's not even guaranteed that when you
> call the GC, all dead objects will be collected.

Ok. Finalizers are better than nothing I guess.



reply via email to

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