hash-table-copy should produce mutable table, PR 7519

svn: r529
This commit is contained in:
Matthew Flatt 2005-08-01 22:47:54 +00:00
parent 0a833c44c4
commit 21a3ded089
3 changed files with 5 additions and 0 deletions

View File

@ -1968,6 +1968,9 @@
(err/rt-test (make-immutable-hash-table cyclic-alist))
(err/rt-test (make-immutable-hash-table '((1 . 2)) 'weak))
(test 2 hash-table-get (hash-table-copy #hasheq((1 . 2))) 1)
(test (void) hash-table-put! (hash-table-copy #hasheq((1 . 2))) 3 4)
(arity-test make-hash-table 0 2)
(arity-test make-immutable-hash-table 1 2)
(arity-test hash-table-count 1 1)

View File

@ -303,6 +303,7 @@ Scheme_Hash_Table *scheme_clone_hash_table(Scheme_Hash_Table *ht)
table = MALLOC_ONE_TAGGED(Scheme_Hash_Table);
memcpy(table, ht, sizeof(Scheme_Hash_Table));
MZ_OPT_HASH_KEY(&(table->iso)) = 0;
if (table->size) {
ba = MALLOC_N(Scheme_Object *, table->size);

View File

@ -3713,6 +3713,7 @@ static int utf8_decode_x(const unsigned char *s, int start, int end,
and [d]end) before return, unless they are NULL.
compact => UTF-8 to UTF-8 or UTF-16 --- the latter if utf16
!compact && utf16 => decode extended UTF-8 that allows surrogates
_state provides initial state and is filled with ending state;
when it's not NULL, the us must be NULL