mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 06:41:13 +02:00
* procs.c (scm_make_subr_opt): Fix typo. Remember to multiple
table lengths by the size of a single element when growing the table.
This commit is contained in:
parent
177c2d8879
commit
98f9c98402
1 changed files with 7 additions and 6 deletions
|
@ -54,7 +54,7 @@
|
||||||
|
|
||||||
scm_subr_entry *scm_subr_table;
|
scm_subr_entry *scm_subr_table;
|
||||||
|
|
||||||
/* libguile contained approx. 700 primitive procedures 990824. */
|
/* libguile contained approx. 700 primitive procedures on 24 Aug 1999. */
|
||||||
|
|
||||||
int scm_subr_table_size = 0;
|
int scm_subr_table_size = 0;
|
||||||
int scm_subr_table_room = 750;
|
int scm_subr_table_room = 750;
|
||||||
|
@ -72,11 +72,12 @@ scm_make_subr_opt (name, type, fcn, set)
|
||||||
|
|
||||||
if (scm_subr_table_size == scm_subr_table_room)
|
if (scm_subr_table_size == scm_subr_table_room)
|
||||||
{
|
{
|
||||||
scm_sizet new_size = scm_port_table_room * 3 / 2;
|
scm_sizet new_size = scm_subr_table_room * 3 / 2;
|
||||||
void *new_table = scm_must_realloc ((char *) scm_subr_table,
|
void *new_table
|
||||||
scm_subr_table_room,
|
= scm_must_realloc ((char *) scm_subr_table,
|
||||||
new_size,
|
sizeof (scm_subr_entry) * scm_subr_table_room,
|
||||||
"scm_make_subr_opt");
|
sizeof (scm_subr_entry) * new_size,
|
||||||
|
"scm_make_subr_opt");
|
||||||
scm_subr_table = new_table;
|
scm_subr_table = new_table;
|
||||||
scm_subr_table_room = new_size;
|
scm_subr_table_room = new_size;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue