diff options
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, | |||
| 3317 | void *func = dynlib_sym (handle, SSDATA (c_name)); | 3317 | void *func = dynlib_sym (handle, SSDATA (c_name)); |
| 3318 | eassert (func); | 3318 | eassert (func); |
| 3319 | 3319 | ||
| 3320 | /* FIXME add gc support, now just leaking. */ | ||
| 3320 | union Aligned_Lisp_Subr *x = xmalloc (sizeof (union Aligned_Lisp_Subr)); | 3321 | union Aligned_Lisp_Subr *x = xmalloc (sizeof (union Aligned_Lisp_Subr)); |
| 3322 | |||
| 3321 | x->s.header.size = PVEC_SUBR << PSEUDOVECTOR_AREA_BITS; | 3323 | x->s.header.size = PVEC_SUBR << PSEUDOVECTOR_AREA_BITS; |
| 3322 | x->s.function.a0 = func; | 3324 | x->s.function.a0 = func; |
| 3323 | x->s.min_args = XFIXNUM (minarg); | 3325 | x->s.min_args = XFIXNUM (minarg); |
| 3324 | x->s.max_args = FIXNUMP (maxarg) ? XFIXNUM (maxarg) : MANY; | 3326 | x->s.max_args = FIXNUMP (maxarg) ? XFIXNUM (maxarg) : MANY; |
| 3325 | x->s.symbol_name = SSDATA (Fsymbol_name (name)); | 3327 | x->s.symbol_name = xstrdup (SSDATA (Fsymbol_name (name))); |
| 3326 | x->s.intspec = NULL; | 3328 | x->s.intspec = NULL; |
| 3327 | x->s.doc = 0; /* FIXME */ | 3329 | x->s.native_doc = doc; |
| 3328 | x->s.native_elisp = true; | 3330 | x->s.native_elisp = true; |
| 3329 | defsubr (x); | 3331 | defsubr (x); |
| 3330 | 3332 | ||
| 3333 | LOADHIST_ATTACH (Fcons (Qdefun, name)); | ||
| 3334 | |||
| 3331 | return Qnil; | 3335 | return Qnil; |
| 3332 | } | 3336 | } |
| 3333 | 3337 | ||