s/pic_sc/pic_sc_ptr/g. s/pic_senv/pic_senv_ptr/g.
This commit is contained in:
parent
4ec8398118
commit
1e5c6d899e
|
@ -27,13 +27,12 @@ struct pic_sc {
|
||||||
struct pic_senv *senv;
|
struct pic_senv *senv;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define pic_sc(v) ((struct pic_sc *)pic_ptr(v))
|
|
||||||
#define pic_sc_p(v) (pic_type(v) == PIC_TT_SC)
|
#define pic_sc_p(v) (pic_type(v) == PIC_TT_SC)
|
||||||
|
#define pic_sc_ptr(v) ((struct pic_sc *)pic_ptr(v))
|
||||||
|
|
||||||
#define pic_macro(v) ((struct pic_macro *)pic_ptr(v))
|
|
||||||
#define pic_macro_p(v) (pic_type(v) == PIC_TT_MACRO)
|
#define pic_macro_p(v) (pic_type(v) == PIC_TT_MACRO)
|
||||||
|
#define pic_macro_ptr(v) ((struct pic_macro *)pic_ptr(v))
|
||||||
|
|
||||||
#define pic_senv(v) ((struct pic_senv *)pic_ptr(v))
|
|
||||||
#define pic_senv_p(v) (pic_type(v) == PIC_TT_SENV)
|
#define pic_senv_p(v) (pic_type(v) == PIC_TT_SENV)
|
||||||
#define pic_senv_ptr(v) ((struct pic_senv *)pic_ptr(v))
|
#define pic_senv_ptr(v) ((struct pic_senv *)pic_ptr(v))
|
||||||
|
|
||||||
|
|
10
src/macro.c
10
src/macro.c
|
@ -166,7 +166,7 @@ identifier_p(pic_value obj)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (pic_sc_p(obj)) {
|
if (pic_sc_p(obj)) {
|
||||||
return identifier_p(pic_sc(obj)->expr);
|
return identifier_p(pic_sc_ptr(obj)->expr);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -539,7 +539,7 @@ macroexpand_node(pic_state *pic, pic_value expr, struct pic_senv *senv, pic_valu
|
||||||
|
|
||||||
switch (pic_type(expr)) {
|
switch (pic_type(expr)) {
|
||||||
case PIC_TT_SC: {
|
case PIC_TT_SC: {
|
||||||
return macroexpand(pic, pic_sc(expr)->expr, pic_sc(expr)->senv, assoc_box);
|
return macroexpand(pic, pic_sc_ptr(expr)->expr, pic_sc_ptr(expr)->senv, assoc_box);
|
||||||
}
|
}
|
||||||
case PIC_TT_SYMBOL: {
|
case PIC_TT_SYMBOL: {
|
||||||
return pic_symbol_value(macroexpand_symbol(pic, pic_sym(expr), senv, assoc_box));
|
return pic_symbol_value(macroexpand_symbol(pic, pic_sym(expr), senv, assoc_box));
|
||||||
|
@ -743,7 +743,7 @@ pic_macro_make_sc(pic_state *pic)
|
||||||
pic_error(pic, "make-syntactic-closure: senv required");
|
pic_error(pic, "make-syntactic-closure: senv required");
|
||||||
|
|
||||||
/* just ignore free_vars for now */
|
/* just ignore free_vars for now */
|
||||||
sc = sc_new(pic, expr, pic_senv(senv));
|
sc = sc_new(pic, expr, pic_senv_ptr(senv));
|
||||||
|
|
||||||
return pic_obj_value(sc);
|
return pic_obj_value(sc);
|
||||||
}
|
}
|
||||||
|
@ -769,11 +769,11 @@ pic_macro_identifier_eq_p(pic_state *pic)
|
||||||
if (! pic_senv_p(e)) {
|
if (! pic_senv_p(e)) {
|
||||||
pic_error(pic, "unexpected type of argument 1");
|
pic_error(pic, "unexpected type of argument 1");
|
||||||
}
|
}
|
||||||
e1 = pic_senv(e);
|
e1 = pic_senv_ptr(e);
|
||||||
if (! pic_senv_p(f)) {
|
if (! pic_senv_p(f)) {
|
||||||
pic_error(pic, "unexpected type of argument 3");
|
pic_error(pic, "unexpected type of argument 3");
|
||||||
}
|
}
|
||||||
e2 = pic_senv(f);
|
e2 = pic_senv_ptr(f);
|
||||||
|
|
||||||
return pic_bool_value(identifier_eq_p(pic, e1, x, e2, y));
|
return pic_bool_value(identifier_eq_p(pic, e1, x, e2, y));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue