diff options
| author | Paul Eggert | 2014-03-20 10:58:01 -0700 |
|---|---|---|
| committer | Paul Eggert | 2014-03-20 10:58:01 -0700 |
| commit | 4c073dab2aad714c148c6d5e9e9b488e9af9bfbc (patch) | |
| tree | e061d30f40fb37afcf9cb23fe81dbd94472e499c | |
| parent | 0df098bfd1954e61f908671071f7e715a5963d62 (diff) | |
| download | emacs-4c073dab2aad714c148c6d5e9e9b488e9af9bfbc.tar.gz emacs-4c073dab2aad714c148c6d5e9e9b488e9af9bfbc.zip | |
* internals.texi (C Integer Types): Prefer 'false' and 'true'
to '0' and '1' for booleans.
| -rw-r--r-- | doc/lispref/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/lispref/internals.texi | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index fb79a74405b..c2d6c8d7012 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-03-20 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * internals.texi (C Integer Types): Prefer 'false' and 'true' | ||
| 4 | to '0' and '1' for booleans. | ||
| 5 | |||
| 1 | 2014-03-19 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2014-03-19 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | * numbers.texi: Improve and clarify a bit, and fix some minor bugs. | 8 | * numbers.texi: Improve and clarify a bit, and fix some minor bugs. |
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index 3eaef134f74..d91b0349810 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi | |||
| @@ -1620,10 +1620,10 @@ might not be. Single-bit bit fields are invariably @code{unsigned | |||
| 1620 | int} so that their values are 0 and 1. | 1620 | int} so that their values are 0 and 1. |
| 1621 | 1621 | ||
| 1622 | @item | 1622 | @item |
| 1623 | In C, Emacs commonly uses @code{bool}, 1, and 0 for boolean values. | 1623 | Prefer @code{bool}, @code{false} and @code{true} for booleans. |
| 1624 | Using @code{bool} for booleans can make programs easier to read and a | 1624 | Using @code{bool} can make programs easier to read and a bit faster than |
| 1625 | bit faster than using @code{int}. Although it is also OK to use | 1625 | using @code{int}. Although it is also OK to use @code{int}, @code{0} |
| 1626 | @code{int}, this older style is gradually being phased out. When | 1626 | and @code{1}, this older style is gradually being phased out. When |
| 1627 | using @code{bool}, respect the limitations of the replacement | 1627 | using @code{bool}, respect the limitations of the replacement |
| 1628 | implementation of @code{bool}, as documented in the source file | 1628 | implementation of @code{bool}, as documented in the source file |
| 1629 | @file{lib/stdbool.in.h}, so that Emacs remains portable to pre-C99 | 1629 | @file{lib/stdbool.in.h}, so that Emacs remains portable to pre-C99 |