[Top][All Lists]

[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: Sat, 26 Sep 2015 16:56:59 +0200

I've implemented signal() and I've made the module support
configurable (disabled by default). Except for signal() all error
related functions are unimplemented (they are not useful because
funcall() doesn't return to module code on error right now). I've also
added a signal test.

The make_string() now takes the length of the string as a parameter.

Right now module are loaded with `module-load'. I need to modify
`load' so that it also looks for modules (which will make `require'

How should module docstring be written? We either:

* pick a new syntax and teach make-docfile how to parse it. This is
the clean approach IMO, but it requires more work. We can use a
sufficiently simple syntax so that it can be embedded in comments in
other languages than C.
* define DEFVAR/DEFUN macro in module API header file to a noop so
that make-docfile can parse it as it is.

As for the finalizer, I wanted to add a function in the API:

/* Finalizer prototype */
typedef int (*emacs_finalizer_function)(void *ptr);

emacs_value make_user_ptr (emacs_env *env,
               void *ptr, emacs_finalizer_function *fin);

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

/* Printer prototype */
typedef emacs_value (*emacs_printer_function)(void *ptr);

/* User-ptr operations */
typedef struct {
  emacs_finalizer_function *fin;
  emacs_printer_function *print;
  /* ... */
} emacs_user_ptr_ops;

emacs_value make_user_ptr (emacs_env *env,
               void *ptr, emacs_user_ptr_ops *ops);

reply via email to

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