core: make-hash-table: Fix optional argument.
* src/hash.c (make_hash_table): Fix optional argument. * src/builtins.c (mes_builtins): Update arity.
This commit is contained in:
parent
bb0e34a8ff
commit
bd58f2a258
|
@ -179,7 +179,7 @@ mes_builtins (struct scm *a) /*:((internal)) */
|
||||||
a = init_builtin (builtin_type, "hashq-set!", 3, &hashq_set_x, a);
|
a = init_builtin (builtin_type, "hashq-set!", 3, &hashq_set_x, a);
|
||||||
a = init_builtin (builtin_type, "hash-set!", 3, &hash_set_x, a);
|
a = init_builtin (builtin_type, "hash-set!", 3, &hash_set_x, a);
|
||||||
a = init_builtin (builtin_type, "hash-table-printer", 1, &hash_table_printer, a);
|
a = init_builtin (builtin_type, "hash-table-printer", 1, &hash_table_printer, a);
|
||||||
a = init_builtin (builtin_type, "make-hash-table", 1, &make_hash_table, a);
|
a = init_builtin (builtin_type, "make-hash-table", -1, &make_hash_table, a);
|
||||||
/* src/lib.c */
|
/* src/lib.c */
|
||||||
a = init_builtin (builtin_type, "core:type", 1, &type_, a);
|
a = init_builtin (builtin_type, "core:type", 1, &type_, a);
|
||||||
a = init_builtin (builtin_type, "core:car", 1, &car_, a);
|
a = init_builtin (builtin_type, "core:car", 1, &car_, a);
|
||||||
|
|
|
@ -205,11 +205,12 @@ make_hash_table_ (long size)
|
||||||
}
|
}
|
||||||
|
|
||||||
struct scm *
|
struct scm *
|
||||||
make_hash_table (struct scm *x)
|
make_hash_table (struct scm *x) /*:((arity . n)) */
|
||||||
{
|
{
|
||||||
long size = 0;
|
long size = 0;
|
||||||
if (x->type == TPAIR)
|
if (x->type == TPAIR)
|
||||||
{
|
{
|
||||||
|
x = x->car;
|
||||||
assert_msg (x->type == TNUMBER, "x->type == TNUMBER");
|
assert_msg (x->type == TNUMBER, "x->type == TNUMBER");
|
||||||
size = x->value;
|
size = x->value;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue