diff options
| author | Karl Heuer | 1997-04-03 22:08:30 +0000 |
|---|---|---|
| committer | Karl Heuer | 1997-04-03 22:08:30 +0000 |
| commit | 25c307484fdefbe8c5be5f33208a8124426c9528 (patch) | |
| tree | 0fa59660d26414e2d350f30a79d82ebd1f7ed398 /src | |
| parent | 5c34fe36c492b92008a7146377a6fe27b6202057 (diff) | |
| download | emacs-25c307484fdefbe8c5be5f33208a8124426c9528.tar.gz emacs-25c307484fdefbe8c5be5f33208a8124426c9528.zip | |
(Fcopy_sequence): Delete unused variable.
(Fchar_table_extra_slot, Fset_char_table_extra_slot): Doc fix.
(map_char_table): When expanding indices, don't increase depth;
that's amount used, not amount allocated.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fns.c | 13 |
1 files changed, 6 insertions, 7 deletions
| @@ -304,15 +304,14 @@ with the original.") | |||
| 304 | 304 | ||
| 305 | if (CHAR_TABLE_P (arg)) | 305 | if (CHAR_TABLE_P (arg)) |
| 306 | { | 306 | { |
| 307 | int i, size; | 307 | int i; |
| 308 | Lisp_Object copy; | 308 | Lisp_Object copy; |
| 309 | 309 | ||
| 310 | /* Calculate the number of extra slots. */ | ||
| 311 | size = CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (arg)); | ||
| 312 | copy = Fmake_char_table (XCHAR_TABLE (arg)->purpose, Qnil); | 310 | copy = Fmake_char_table (XCHAR_TABLE (arg)->purpose, Qnil); |
| 313 | /* Copy all the slots, including the extra ones. */ | 311 | /* Copy all the slots, including the extra ones. */ |
| 314 | bcopy (XCHAR_TABLE (arg)->contents, XCHAR_TABLE (copy)->contents, | 312 | bcopy (XCHAR_TABLE (arg)->contents, XCHAR_TABLE (copy)->contents, |
| 315 | (XCHAR_TABLE (arg)->size & PSEUDOVECTOR_SIZE_MASK) * sizeof (Lisp_Object)); | 313 | ((XCHAR_TABLE (arg)->size & PSEUDOVECTOR_SIZE_MASK) |
| 314 | * sizeof (Lisp_Object))); | ||
| 316 | 315 | ||
| 317 | /* Recursively copy any char-tables in the ordinary slots. */ | 316 | /* Recursively copy any char-tables in the ordinary slots. */ |
| 318 | for (i = 0; i < CHAR_TABLE_ORDINARY_SLOTS; i++) | 317 | for (i = 0; i < CHAR_TABLE_ORDINARY_SLOTS; i++) |
| @@ -1251,7 +1250,7 @@ PARENT must be either nil or another char-table.") | |||
| 1251 | 1250 | ||
| 1252 | DEFUN ("char-table-extra-slot", Fchar_table_extra_slot, Schar_table_extra_slot, | 1251 | DEFUN ("char-table-extra-slot", Fchar_table_extra_slot, Schar_table_extra_slot, |
| 1253 | 2, 2, 0, | 1252 | 2, 2, 0, |
| 1254 | "Return the value in extra-slot number N of char-table CHAR-TABLE.") | 1253 | "Return the value of CHAR-TABLE's extra-slot number N.") |
| 1255 | (char_table, n) | 1254 | (char_table, n) |
| 1256 | Lisp_Object char_table, n; | 1255 | Lisp_Object char_table, n; |
| 1257 | { | 1256 | { |
| @@ -1267,7 +1266,7 @@ DEFUN ("char-table-extra-slot", Fchar_table_extra_slot, Schar_table_extra_slot, | |||
| 1267 | DEFUN ("set-char-table-extra-slot", Fset_char_table_extra_slot, | 1266 | DEFUN ("set-char-table-extra-slot", Fset_char_table_extra_slot, |
| 1268 | Sset_char_table_extra_slot, | 1267 | Sset_char_table_extra_slot, |
| 1269 | 3, 3, 0, | 1268 | 3, 3, 0, |
| 1270 | "Set extra-slot number N of CHAR-TABLE to VALUE.") | 1269 | "Set CHAR-TABLE's extra-slot number N to VALUE.") |
| 1271 | (char_table, n, value) | 1270 | (char_table, n, value) |
| 1272 | Lisp_Object char_table, n, value; | 1271 | Lisp_Object char_table, n, value; |
| 1273 | { | 1272 | { |
| @@ -1378,7 +1377,7 @@ map_char_table (c_function, function, chartable, depth, indices) | |||
| 1378 | if ((depth % 10) == 9) | 1377 | if ((depth % 10) == 9) |
| 1379 | { | 1378 | { |
| 1380 | Lisp_Object *new_indices | 1379 | Lisp_Object *new_indices |
| 1381 | = (Lisp_Object *) alloca ((depth += 10) * sizeof (Lisp_Object)); | 1380 | = (Lisp_Object *) alloca ((depth + 10) * sizeof (Lisp_Object)); |
| 1382 | bcopy (indices, new_indices, depth * sizeof (Lisp_Object)); | 1381 | bcopy (indices, new_indices, depth * sizeof (Lisp_Object)); |
| 1383 | indices = new_indices; | 1382 | indices = new_indices; |
| 1384 | } | 1383 | } |