diff lispref/internals.texi @ 10487:9a4ff0104cdc

entered into RCS
author Richard M. Stallman <rms@gnu.org>
date Fri, 20 Jan 1995 00:57:39 +0000
parents 4d87344e6dfb
children 311f3ea4a759
line wrap: on
line diff
--- a/lispref/internals.texi	Thu Jan 19 23:37:10 1995 +0000
+++ b/lispref/internals.texi	Fri Jan 20 00:57:39 1995 +0000
@@ -503,17 +503,18 @@
 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}).
+  You must not use C initializers for static or global variables unless
+they are never written once Emacs is dumped.  These variables with
+initializers are allocated in an area of memory that becomes read-only
+(on certain operating systems) as a result of dumping Emacs.  @xref{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.
+  Do not use static variables within functions---place all static
+variables at top level in the file.  This is necessary because Emacs on
+some operating systems defines the keyword @code{static} as a null
+macro.  (This definition is used because those systems put all variables
+declared static in a place that becomes read-only after dumping, whether
+they have initializers or not.)
 
   Defining the C function is not enough to make a Lisp primitive
 available; you must also create the Lisp symbol for the primitive and