write function should be print even env objects
This commit is contained in:
parent
a0a8a94abc
commit
073f45666a
|
@ -23,6 +23,9 @@ struct pic_port {
|
||||||
};
|
};
|
||||||
|
|
||||||
#define pic_port_p(v) (pic_type(v) == PIC_TT_PORT)
|
#define pic_port_p(v) (pic_type(v) == PIC_TT_PORT)
|
||||||
|
#define pic_env_p(v) (pic_type(v) == PIC_TT_ENV)
|
||||||
|
|
||||||
#define pic_port_ptr(v) ((struct pic_port *)(v).u.data)
|
#define pic_port_ptr(v) ((struct pic_port *)(v).u.data)
|
||||||
|
#define pic_env_ptr(v) ((struct pic_env *)(v).u.data)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -65,7 +65,8 @@ write(pic_state *pic, pic_value obj)
|
||||||
printf(")");
|
printf(")");
|
||||||
break;
|
break;
|
||||||
case PIC_TT_ENV:
|
case PIC_TT_ENV:
|
||||||
pic_abort(pic, "logic flaw");
|
printf("#<env %p>", pic_env_ptr(obj));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue