diff options
| author | Eli Zaretskii | 2010-07-09 11:38:50 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2010-07-09 11:38:50 +0300 |
| commit | b88746ba3f819730cc761c3cc72a3c0ee523fb4f (patch) | |
| tree | c6bb40bc020b077dfddca1512a0a16be2b1c55f6 /doc | |
| parent | 0508c67f47a9b79684f2f454010a2d086df7f35b (diff) | |
| download | emacs-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/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/lispref/internals.texi | 21 |
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 @@ | |||
| 1 | 2010-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 | |||
| 1 | 2010-06-02 Chong Yidong <cyd@stupidchicken.com> | 6 | 2010-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 |
| 520 | usage: (or CONDITIONS ...) */) | 520 | usage: (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 | |||
| 618 | too. | 617 | too. |
| 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 |
| 622 | name list that every C function must have, followed by ordinary C | 621 | argument list that every C function must have, including the types for |
| 623 | declarations for the arguments. For a function with a fixed maximum | 622 | the arguments. For a function with a fixed maximum number of |
| 624 | number of arguments, declare a C argument for each Lisp argument, and | 623 | arguments, declare a C argument for each Lisp argument, and give them |
| 625 | give them all type @code{Lisp_Object}. When a Lisp function has no | 624 | all type @code{Lisp_Object}. When a Lisp function has no upper limit |
| 626 | upper limit on the number of arguments, its implementation in C actually | 625 | on the number of arguments, its implementation in C actually receives |
| 627 | receives exactly two arguments: the first is the number of Lisp | 626 | exactly two arguments: the first is the number of Lisp arguments, and |
| 628 | arguments, and the second is the address of a block containing their | 627 | the second is the address of a block containing their values. They |
| 629 | values. They have types @code{int} and @w{@code{Lisp_Object *}}. | 628 | have 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 |