1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-01 04:19:55 +00:00

Address #753 - fix gensym regression.

This commit is contained in:
Calvin Rose 2021-08-06 16:24:30 -05:00
parent bb5c3773f1
commit a78cbd91da
2 changed files with 4 additions and 1 deletions

View File

@ -43,7 +43,8 @@ void janet_symcache_init() {
if (NULL == janet_vm.cache) { if (NULL == janet_vm.cache) {
JANET_OUT_OF_MEMORY; JANET_OUT_OF_MEMORY;
} }
memset(&janet_vm.gensym_counter, 0, sizeof(janet_vm.gensym_counter)); memset(&janet_vm.gensym_counter, '0', sizeof(janet_vm.gensym_counter));
janet_vm.gensym_counter[0] = '_';
janet_vm.cache_count = 0; janet_vm.cache_count = 0;
janet_vm.cache_deleted = 0; janet_vm.cache_deleted = 0;
} }

View File

@ -311,4 +311,6 @@
(tracev (def my-unique-var-name true)) (tracev (def my-unique-var-name true))
(assert my-unique-var-name "tracev upscopes") (assert my-unique-var-name "tracev upscopes")
(assert (pos? (length (gensym))) "gensym not empty, regression #753")
(end-suite) (end-suite)