diff options
| author | Paul Eggert | 2011-04-09 15:31:34 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-09 15:31:34 -0700 |
| commit | f9a68bc5fccc6e3b48d59199addaeeaf2a92a8b0 (patch) | |
| tree | 525474f88e82fb7255b6fed42185559101858922 /src | |
| parent | 9248994de4e597941230d9cb07a50df994c7825b (diff) | |
| download | emacs-f9a68bc5fccc6e3b48d59199addaeeaf2a92a8b0.tar.gz emacs-f9a68bc5fccc6e3b48d59199addaeeaf2a92a8b0.zip | |
* casetab.c (set_identity, shuffle): Likewise.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 1 | ||||
| -rw-r--r-- | src/casetab.c | 10 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9029fff9820..a979af1050d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | * charset.c (load_charset_map): <, not <=, for optimization. | 3 | * charset.c (load_charset_map): <, not <=, for optimization. |
| 4 | * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise. | 4 | * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise. |
| 5 | * casetab.c (set_identity, shuffle): Likewise. | ||
| 5 | 6 | ||
| 6 | * xmenu.c (set_frame_menubar): Allocate smaller local vectors. | 7 | * xmenu.c (set_frame_menubar): Allocate smaller local vectors. |
| 7 | This also lets GCC 4.6.0 generate slightly better loop code. | 8 | This also lets GCC 4.6.0 generate slightly better loop code. |
diff --git a/src/casetab.c b/src/casetab.c index 56f6b065358..9a1accf6940 100644 --- a/src/casetab.c +++ b/src/casetab.c | |||
| @@ -191,7 +191,8 @@ set_identity (Lisp_Object table, Lisp_Object c, Lisp_Object elt) | |||
| 191 | { | 191 | { |
| 192 | if (NATNUMP (elt)) | 192 | if (NATNUMP (elt)) |
| 193 | { | 193 | { |
| 194 | int from, to; | 194 | int from; |
| 195 | unsigned to; | ||
| 195 | 196 | ||
| 196 | if (CONSP (c)) | 197 | if (CONSP (c)) |
| 197 | { | 198 | { |
| @@ -200,7 +201,7 @@ set_identity (Lisp_Object table, Lisp_Object c, Lisp_Object elt) | |||
| 200 | } | 201 | } |
| 201 | else | 202 | else |
| 202 | from = to = XINT (c); | 203 | from = to = XINT (c); |
| 203 | for (; from <= to; from++) | 204 | for (to++; from < to; from++) |
| 204 | CHAR_TABLE_SET (table, from, make_number (from)); | 205 | CHAR_TABLE_SET (table, from, make_number (from)); |
| 205 | } | 206 | } |
| 206 | } | 207 | } |
| @@ -215,7 +216,8 @@ shuffle (Lisp_Object table, Lisp_Object c, Lisp_Object elt) | |||
| 215 | { | 216 | { |
| 216 | if (NATNUMP (elt)) | 217 | if (NATNUMP (elt)) |
| 217 | { | 218 | { |
| 218 | int from, to; | 219 | int from; |
| 220 | unsigned to; | ||
| 219 | 221 | ||
| 220 | if (CONSP (c)) | 222 | if (CONSP (c)) |
| 221 | { | 223 | { |
| @@ -225,7 +227,7 @@ shuffle (Lisp_Object table, Lisp_Object c, Lisp_Object elt) | |||
| 225 | else | 227 | else |
| 226 | from = to = XINT (c); | 228 | from = to = XINT (c); |
| 227 | 229 | ||
| 228 | for (; from <= to; from++) | 230 | for (to++; from < to; from++) |
| 229 | { | 231 | { |
| 230 | Lisp_Object tem = Faref (table, elt); | 232 | Lisp_Object tem = Faref (table, elt); |
| 231 | Faset (table, elt, make_number (from)); | 233 | Faset (table, elt, make_number (from)); |