diff options
author | Andrea Corallo <akrl@sdf.org> | 2019-12-07 11:28:21 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-01-01 11:38:11 +0100 |
commit | f4de790beec514808eafd1cb22fa5eacdecd4552 (patch) | |
tree | 0c14d43cd7313875a9730a3834de30d59ef40aaf /src/comp.c | |
parent | e05253cb9bc4a35c7dedc3cbb2830e37d385a339 (diff) | |
download | emacs-f4de790beec514808eafd1cb22fa5eacdecd4552.tar.gz emacs-f4de790beec514808eafd1cb22fa5eacdecd4552.tar.bz2 emacs-f4de790beec514808eafd1cb22fa5eacdecd4552.zip |
add native compiled function docstring support
Diffstat (limited to 'src/comp.c')
-rw-r--r-- | src/comp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/comp.c b/src/comp.c index e2629de0426..5a00200ee87 100644 --- a/src/comp.c +++ b/src/comp.c @@ -3317,17 +3317,21 @@ DEFUN ("comp--register-subr", Fcomp__register_subr, void *func = dynlib_sym (handle, SSDATA (c_name)); eassert (func); + /* FIXME add gc support, now just leaking. */ union Aligned_Lisp_Subr *x = xmalloc (sizeof (union Aligned_Lisp_Subr)); + x->s.header.size = PVEC_SUBR << PSEUDOVECTOR_AREA_BITS; x->s.function.a0 = func; x->s.min_args = XFIXNUM (minarg); x->s.max_args = FIXNUMP (maxarg) ? XFIXNUM (maxarg) : MANY; - x->s.symbol_name = SSDATA (Fsymbol_name (name)); + x->s.symbol_name = xstrdup (SSDATA (Fsymbol_name (name))); x->s.intspec = NULL; - x->s.doc = 0; /* FIXME */ + x->s.native_doc = doc; x->s.native_elisp = true; defsubr (x); + LOADHIST_ATTACH (Fcons (Qdefun, name)); + return Qnil; } |