From: Eli Zaretskii Date: Fri, 9 Jul 2010 08:38:50 +0000 (+0300) Subject: Adapt docs of primitives to ANSI C arg list. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~51^2~78^2~26 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b88746ba3f819730cc761c3cc72a3c0ee523fb4f;p=emacs.git 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. --- 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 @@ +2010-07-09 Eli Zaretskii + + * internals.texi (Writing Emacs Primitives): Adapt to ANSI C + calling sequences, which are now the standard. + 2010-06-02 Chong Yidong * 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. @end group @group usage: (or CONDITIONS ...) */) - (args) - Lisp_Object args; + (Lisp_Object args) @{ register Lisp_Object val = Qnil; struct gcpro gcpro1; @@ -618,15 +617,15 @@ All the usual rules for documentation strings in Lisp code too. @end table - After the call to the @code{DEFUN} macro, you must write the argument -name list that every C function must have, followed by ordinary C -declarations for the arguments. For a function with a fixed maximum -number of arguments, declare a C argument for each Lisp argument, and -give them all type @code{Lisp_Object}. When a Lisp function has no -upper limit on the number of arguments, its implementation in C actually -receives exactly two arguments: the first is the number of Lisp -arguments, and the second is the address of a block containing their -values. They have types @code{int} and @w{@code{Lisp_Object *}}. + After the call to the @code{DEFUN} macro, you must write the +argument list that every C function must have, including the types for +the arguments. For a function with a fixed maximum number of +arguments, declare a C argument for each Lisp argument, and give them +all type @code{Lisp_Object}. When a Lisp function has no upper limit +on the number of arguments, its implementation in C actually receives +exactly two arguments: the first is the number of Lisp arguments, and +the second is the address of a block containing their values. They +have types @code{int} and @w{@code{Lisp_Object *}}. @cindex @code{GCPRO} and @code{UNGCPRO} @cindex protect C variables from garbage collection