diff options
| author | Eli Zaretskii | 2007-10-13 12:06:41 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2007-10-13 12:06:41 +0000 |
| commit | 1d15320697ce2d39c0dc5daa44530a34859c29ac (patch) | |
| tree | 3470e11f88817c02a69f6a6788858c32544cc86b /src | |
| parent | de0280a2ab8c955a1554455c7fec4c4b05308d97 (diff) | |
| download | emacs-1d15320697ce2d39c0dc5daa44530a34859c29ac.tar.gz emacs-1d15320697ce2d39c0dc5daa44530a34859c29ac.zip | |
(Fregister_ccl_program, Fregister_code_conversion_map): Use larger_vector.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ccl.c | 23 |
1 files changed, 4 insertions, 19 deletions
| @@ -2348,16 +2348,8 @@ Return index number of the registered CCL program. */) | |||
| 2348 | } | 2348 | } |
| 2349 | 2349 | ||
| 2350 | if (idx == len) | 2350 | if (idx == len) |
| 2351 | { | 2351 | /* Extend the table. */ |
| 2352 | /* Extend the table. */ | 2352 | Vccl_program_table = larger_vector (Vccl_program_table, len * 2, Qnil); |
| 2353 | Lisp_Object new_table; | ||
| 2354 | int j; | ||
| 2355 | |||
| 2356 | new_table = Fmake_vector (make_number (len * 2), Qnil); | ||
| 2357 | for (j = 0; j < len; j++) | ||
| 2358 | ASET (new_table, j, AREF (Vccl_program_table, j)); | ||
| 2359 | Vccl_program_table = new_table; | ||
| 2360 | } | ||
| 2361 | 2353 | ||
| 2362 | { | 2354 | { |
| 2363 | Lisp_Object elt; | 2355 | Lisp_Object elt; |
| @@ -2416,15 +2408,8 @@ Return index number of the registered map. */) | |||
| 2416 | } | 2408 | } |
| 2417 | 2409 | ||
| 2418 | if (i == len) | 2410 | if (i == len) |
| 2419 | { | 2411 | Vcode_conversion_map_vector = larger_vector |
| 2420 | Lisp_Object new_vector = Fmake_vector (make_number (len * 2), Qnil); | 2412 | (Vcode_conversion_map_vector, len * 2, Qnil); |
| 2421 | int j; | ||
| 2422 | |||
| 2423 | for (j = 0; j < len; j++) | ||
| 2424 | AREF (new_vector, j) | ||
| 2425 | = AREF (Vcode_conversion_map_vector, j); | ||
| 2426 | Vcode_conversion_map_vector = new_vector; | ||
| 2427 | } | ||
| 2428 | 2413 | ||
| 2429 | index = make_number (i); | 2414 | index = make_number (i); |
| 2430 | Fput (symbol, Qcode_conversion_map, map); | 2415 | Fput (symbol, Qcode_conversion_map, map); |