remove redundant prefixes
This commit is contained in:
parent
a20356952b
commit
e9d5fb3ab5
|
@ -130,8 +130,8 @@ void pic_define(pic_state *, const char *, pic_value); /* automatic export */
|
||||||
pic_value pic_ref(pic_state *, const char *);
|
pic_value pic_ref(pic_state *, const char *);
|
||||||
void pic_set(pic_state *, const char *, pic_value);
|
void pic_set(pic_state *, const char *, pic_value);
|
||||||
|
|
||||||
#define pic_try \
|
#define pic_try \
|
||||||
pic_try_helper__(GENSYM(pic_try_i__), GENSYM(pic_try_jmp__), GENSYM(pic_try_prev_jmp__))
|
pic_try_helper__(GENSYM(i), GENSYM(here), GENSYM(prev_jmp))
|
||||||
#define pic_try_helper__(i, here, prev_jmp) \
|
#define pic_try_helper__(i, here, prev_jmp) \
|
||||||
for (int i = 0; ! i; ) \
|
for (int i = 0; ! i; ) \
|
||||||
for (jmp_buf here, *prev_jmp = pic->jmp; ! i; ) \
|
for (jmp_buf here, *prev_jmp = pic->jmp; ! i; ) \
|
||||||
|
@ -174,7 +174,7 @@ struct pic_lib *pic_make_library(pic_state *, pic_value);
|
||||||
struct pic_lib *pic_find_library(pic_state *, pic_value);
|
struct pic_lib *pic_find_library(pic_state *, pic_value);
|
||||||
|
|
||||||
#define pic_deflibrary(spec) \
|
#define pic_deflibrary(spec) \
|
||||||
pic_deflibrary_helper__(GENSYM(pic_deflib_i__), GENSYM(pic_deflib_prev_lib__), spec)
|
pic_deflibrary_helper__(GENSYM(i), GENSYM(prev_lib), spec)
|
||||||
#define pic_deflibrary_helper__(i, prev_lib, spec) \
|
#define pic_deflibrary_helper__(i, prev_lib, spec) \
|
||||||
for (int i = 0; ! i; ) \
|
for (int i = 0; ! i; ) \
|
||||||
for (struct pic_lib *prev_lib; ! i; ) \
|
for (struct pic_lib *prev_lib; ! i; ) \
|
||||||
|
|
|
@ -33,7 +33,7 @@ pic_value pic_list_by_array(pic_state *, size_t, pic_value *);
|
||||||
pic_value pic_make_list(pic_state *, int, pic_value);
|
pic_value pic_make_list(pic_state *, int, pic_value);
|
||||||
|
|
||||||
#define pic_for_each(var, list) \
|
#define pic_for_each(var, list) \
|
||||||
pic_for_each_helper__(var, GENSYM(pic_for_each_tmp__), list)
|
pic_for_each_helper__(var, GENSYM(tmp), list)
|
||||||
#define pic_for_each_helper__(var, tmp, list) \
|
#define pic_for_each_helper__(var, tmp, list) \
|
||||||
for (pic_value tmp = (list); \
|
for (pic_value tmp = (list); \
|
||||||
pic_nil_p(tmp) ? false : ((var = pic_car(pic, tmp)), true); \
|
pic_nil_p(tmp) ? false : ((var = pic_car(pic, tmp)), true); \
|
||||||
|
|
Loading…
Reference in New Issue