From 95c82688bc8063f0be5a04baee5ea2a18f9ddf6b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 10 Apr 2011 18:47:57 -0700 Subject: [PATCH] * lisp.h (DEFINE_FUNC): Make sname 'static'. --- src/ChangeLog | 3 +++ src/lisp.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 56bb83e0314..8d492d1cdf5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-04-11 Paul Eggert + * lisp.h (DEFINE_FUNC): Make sname 'static'. + Make Emacs functions such as Fatom 'static' by default. This makes it easier for human readers (and static analyzers) to see whether these functions can be called from other modules. @@ -16,6 +18,7 @@ Remove decls, since these functions are now static. (Funintern, Fget_internal_run_time): New decls, since these functions were already external. + * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c: * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c: * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c: diff --git a/src/lisp.h b/src/lisp.h index 6a28a0f81b3..10fc66f4406 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1811,7 +1811,7 @@ typedef struct { #define DEFUE extern DEFINE_FUNC #define DEFINE_FUNC(lname, fnname, sname, minargs, maxargs, intspec, doc) \ Lisp_Object fnname DEFUN_ARGS_ ## maxargs ; \ - DECL_ALIGN (struct Lisp_Subr, sname) = \ + static DECL_ALIGN (struct Lisp_Subr, sname) = \ { PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)), \ { .a ## maxargs = fnname }, \ minargs, maxargs, lname, intspec, 0}; \ -- 2.39.2