aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorEli Zaretskii2010-07-09 11:38:50 +0300
committerEli Zaretskii2010-07-09 11:38:50 +0300
commitb88746ba3f819730cc761c3cc72a3c0ee523fb4f (patch)
treec6bb40bc020b077dfddca1512a0a16be2b1c55f6 /doc
parent0508c67f47a9b79684f2f454010a2d086df7f35b (diff)
downloademacs-b88746ba3f819730cc761c3cc72a3c0ee523fb4f.tar.gz
emacs-b88746ba3f819730cc761c3cc72a3c0ee523fb4f.zip
Adapt docs of primitives to ANSI C arg list.
internals.texi (Writing Emacs Primitives): Adapt to ANSI C calling sequences, which are now the standard.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/internals.texi21
2 files changed, 15 insertions, 11 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index cecb6f0c661..9f032af4a0d 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
12010-07-09 Eli Zaretskii <eliz@gnu.org>
2
3 * internals.texi (Writing Emacs Primitives): Adapt to ANSI C
4 calling sequences, which are now the standard.
5
12010-06-02 Chong Yidong <cyd@stupidchicken.com> 62010-06-02 Chong Yidong <cyd@stupidchicken.com>
2 7
3 * searching.texi (Regexp Special): Remove obsolete information 8 * searching.texi (Regexp Special): Remove obsolete information
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi
index 6b076d8ee3a..569bce56213 100644
--- a/doc/lispref/internals.texi
+++ b/doc/lispref/internals.texi
@@ -518,8 +518,7 @@ If all args return nil, return nil.
518@end group 518@end group
519@group 519@group
520usage: (or CONDITIONS ...) */) 520usage: (or CONDITIONS ...) */)
521 (args) 521 (Lisp_Object args)
522 Lisp_Object args;
523@{ 522@{
524 register Lisp_Object val = Qnil; 523 register Lisp_Object val = Qnil;
525 struct gcpro gcpro1; 524 struct gcpro gcpro1;
@@ -618,15 +617,15 @@ All the usual rules for documentation strings in Lisp code
618too. 617too.
619@end table 618@end table
620 619
621 After the call to the @code{DEFUN} macro, you must write the argument 620 After the call to the @code{DEFUN} macro, you must write the
622name list that every C function must have, followed by ordinary C 621argument list that every C function must have, including the types for
623declarations for the arguments. For a function with a fixed maximum 622the arguments. For a function with a fixed maximum number of
624number of arguments, declare a C argument for each Lisp argument, and 623arguments, declare a C argument for each Lisp argument, and give them
625give them all type @code{Lisp_Object}. When a Lisp function has no 624all type @code{Lisp_Object}. When a Lisp function has no upper limit
626upper limit on the number of arguments, its implementation in C actually 625on the number of arguments, its implementation in C actually receives
627receives exactly two arguments: the first is the number of Lisp 626exactly two arguments: the first is the number of Lisp arguments, and
628arguments, and the second is the address of a block containing their 627the second is the address of a block containing their values. They
629values. They have types @code{int} and @w{@code{Lisp_Object *}}. 628have types @code{int} and @w{@code{Lisp_Object *}}.
630 629
631@cindex @code{GCPRO} and @code{UNGCPRO} 630@cindex @code{GCPRO} and @code{UNGCPRO}
632@cindex protect C variables from garbage collection 631@cindex protect C variables from garbage collection