emacs-devel
[Top][All Lists]
Advanced

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

Re: Dynamic loading progress


From: Tom Tromey
Subject: Re: Dynamic loading progress
Date: Sat, 03 Oct 2015 22:30:26 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>>>>> "Aurélien" == Aurélien Aptel <address@hidden> writes:

[ module progress ]

Tonight I tried to use the module code to write an FFI module using
libffi.  I found some holes that make this difficult to do.

Aurélien> As for the finalizer, I wanted to add a function in the API:

Aurélien> Or we can have a full "method table" with printer function and other
Aurélien> things we might need in the future. Although It's a bit overkill with
Aurélien> just finalizer/printer...

It would be great to be able to make new types from C.  That would let
me wrap up various C objects I'd like to return opaquely to Lisp.
Wrapping pointers would be good enough (for now I am using bit vectors)
but having more control would be much better.

Overkill here is better.  You'll want to extend this vtable over time,
for example to add a GC mark function.  I don't particularly care if the
vtable is exposed or private.

Of course, if you can add types from C, why not from Lisp?  But I guess
I could write a module to allow that :)


Here's my list of other things that I noticed.
Note that my module isn't working yet, so take it with a grain of salt.

* I found the emacs_runtime / emacs_env split strange.  I don't know
  what the purpose of this is.  Also there doesn't seem to be a way to
  free an emacs_env, which I suppose makes sense in a way; though
  shouldn't they simply be GC'd as well?

* module-call never frees "args".

* For error handling for now I ended up just calling Emacs stuff
  directly.

Tom



reply via email to

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