Author: Gianluca Guida <glguida@tlbflush.org>
Date: Thu Mar 2 22:11:49 UTC 2017
Parent: 7e23bcbe2ff71add604c636cade76cbf86bba330
Log message:
lac: add GC-COLLECT
1: diff --git a/src/lib/lac.c b/src/lib/lac.c 2: index df17ea9..020e064 100644 3: --- a/src/lib/lac.c 4: +++ b/src/lib/lac.c 5: @@ -682,6 +682,15 @@ LAC_API static lreg_t proc_load(lreg_t args, lenv_t *argenv, lenv_t *env) 6: } 7: 8: 9: +LAC_API static lreg_t proc_collect(lreg_t args, lenv_t *argenv, lenv_t *env) 10: +{ 11: + _EXPECT_ARGS(args, 0); 12: + 13: + GC_gcollect(); 14: + return sym_true; 15: +} 16: + 17: + 18: /* 19: * Initialization Functions 20: */ 21: @@ -715,7 +724,7 @@ static void machine_init(lenv_t *env) 22: lac_extproc_register(env,"RPLACA", proc_rplaca); 23: lac_extproc_register(env,"RPLACD", proc_rplacd); 24: lac_extproc_register(env,"EQ", proc_eq); 25: - lac_extproc_register(env, "ATOM-EQUAL", proc_atom_equal); 26: + lac_extproc_register(env,"ATOM-EQUAL", proc_atom_equal); 27: lac_extproc_register(env,"LOAD", proc_load); 28: lac_extproc_register(env,"SET", proc_set); 29: lac_extproc_register(env,"GENSYM", proc_gensym); 30: @@ -727,6 +736,8 @@ static void machine_init(lenv_t *env) 31: sym_unquote = register_symbol("UNQUOTE"); 32: sym_splice = register_symbol("SPLICE"); 33: sym_rest = register_symbol("&REST"); 34: + 35: + lac_extproc_register(env, "GC-COLLECT", proc_collect); 36: } 37: 38: void map_init(lenv_t *env);