emacs-devel
[Top][All Lists]
Advanced

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

Re: Dynamic loading progress


From: Eli Zaretskii
Subject: Re: Dynamic loading progress
Date: Fri, 13 Feb 2015 21:11:21 +0200

> Date: Fri, 13 Feb 2015 09:44:47 -0800
> From: Daniel Colascione <address@hidden>
> Cc: address@hidden
> 
> struct emacs_runtime {
>   /* Return NULL on failure */
>   struct emacs_interface* (*init)(
>     int interface_version,
>     const char* my_license);
> };
> 
> struct emacs_interface_1 {
>   /* Err, something like this */
>   struct emacs_value* (*defun)(const char* name, int nargs);
>   struct emacs_value* (*funcall)(struct emacs_value* func, ...);
> };
> 
> /* Exported by loadable modules and called on load.
>    Return 0 on success or -1 on error. */
> extern int emacs_init(struct emacs_runtime*);
> 
> This way, Emacs itself doesn't need to export any symbols and it can
> support multiple interface versions sanely.

IOW, you suggest that the interface will be through function
pointers.  That's how Gawk does it.

This method (and any other) will need function pointers to create Lisp
data structures, though.  Like strings, lists, vectors, etc.



reply via email to

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