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:
Jan Nieuwenhuizen 2019-11-10 11:12:03 +01:00 committed by Jan (janneke) Nieuwenhuizen
parent 834c643c0f
commit c09db59434
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
2 changed files with 3 additions and 2 deletions

View File

@ -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, "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, "make-hash-table", 1, &make_hash_table, a);
a = init_builtin (builtin_type, "make-hash-table", -1, &make_hash_table, a);
/* src/lib.c */
a = init_builtin (builtin_type, "core:type", 1, &type_, a);
a = init_builtin (builtin_type, "core:car", 1, &car_, a);

View File

@ -205,11 +205,12 @@ make_hash_table_ (long size)
}
struct scm *
make_hash_table (struct scm *x)
make_hash_table (struct scm *x) /*:((arity . n)) */
{
long size = 0;
if (x->type == TPAIR)
{
x = x->car;
assert_msg (x->type == TNUMBER, "x->type == TNUMBER");
size = x->value;
}