summaryrefslogtreecommitdiff
path: root/lispref
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-01-19 07:25:03 +0000
committerRichard M. Stallman <rms@gnu.org>1995-01-19 07:25:03 +0000
commit6b69589527ac5b7d7e4d3d5367146de36f041364 (patch)
tree3e795368d498dc73aadc56076cce028fbe0c12dc /lispref
parent1d1bba79203c42e2a3ef4abdfca7c38e5a383003 (diff)
downloademacs-6b69589527ac5b7d7e4d3d5367146de36f041364.tar.gz
*** empty log message ***
Diffstat (limited to 'lispref')
-rw-r--r--lispref/internals.texi12
1 files changed, 12 insertions, 0 deletions
diff --git a/lispref/internals.texi b/lispref/internals.texi
index 8f15e308ad4..df9672b05b6 100644
--- a/lispref/internals.texi
+++ b/lispref/internals.texi
@@ -503,6 +503,18 @@ must declare these explicitly, with type @code{struct gcpro}. Thus, if
you use @code{GCPRO2}, you must declare @code{gcpro1} and @code{gcpro2}.
Alas, we can't explain all the tricky details here.
+ Remember that you must never initialise external variables (whether
+static or not). If you do that, the linker will put the variable into
+the initialised data area of the process, which on many architectures
+becomes read-only when emacs is dumped (@pxref {Pure Storage}).
+
+ Remember also that the keyword @code{static} is defined as nothing on
+many architectures whose linkers would put every static variable in the
+initialised data area, which becomes read-only after dumping. This
+means that you must never use static local variables, because on those
+architectures they would lose the @code{static} specifier and become
+automatic. Use static external variables instead.
+
Defining the C function is not enough to make a Lisp primitive
available; you must also create the Lisp symbol for the primitive and
store a suitable subr object in its function cell. The code looks like