move features procedure defun to state.c benz
This commit is contained in:
parent
62b7c1a0f9
commit
63d3510de8
|
@ -518,4 +518,6 @@
|
||||||
write-string
|
write-string
|
||||||
write-u8
|
write-u8
|
||||||
write-bytevector
|
write-bytevector
|
||||||
flush-output-port))
|
flush-output-port)
|
||||||
|
|
||||||
|
(export features))
|
||||||
|
|
|
@ -91,6 +91,14 @@ pic_init_features(pic_state *pic)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static pic_value
|
||||||
|
pic_features(pic_state *pic)
|
||||||
|
{
|
||||||
|
pic_get_args(pic, "");
|
||||||
|
|
||||||
|
return pic->features;
|
||||||
|
}
|
||||||
|
|
||||||
#define DONE pic_gc_arena_restore(pic, ai);
|
#define DONE pic_gc_arena_restore(pic, ai);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -111,6 +119,8 @@ pic_init_core(pic_state *pic)
|
||||||
pic_define_syntactic_keyword(pic, pic->lib->env, pic->sBEGIN, pic->uBEGIN);
|
pic_define_syntactic_keyword(pic, pic->lib->env, pic->sBEGIN, pic->uBEGIN);
|
||||||
pic_define_syntactic_keyword(pic, pic->lib->env, pic->sDEFINE_MACRO, pic->uDEFINE_MACRO);
|
pic_define_syntactic_keyword(pic, pic->lib->env, pic->sDEFINE_MACRO, pic->uDEFINE_MACRO);
|
||||||
|
|
||||||
|
pic_defun(pic, "features", pic_features);
|
||||||
|
|
||||||
pic_init_undef(pic); DONE;
|
pic_init_undef(pic); DONE;
|
||||||
pic_init_bool(pic); DONE;
|
pic_init_bool(pic); DONE;
|
||||||
pic_init_pair(pic); DONE;
|
pic_init_pair(pic); DONE;
|
||||||
|
|
|
@ -286,4 +286,6 @@
|
||||||
write-shared
|
write-shared
|
||||||
display)
|
display)
|
||||||
|
|
||||||
(export eval))
|
(export eval)
|
||||||
|
|
||||||
|
(export features))
|
||||||
|
|
12
src/main.c
12
src/main.c
|
@ -7,14 +7,6 @@
|
||||||
void pic_init_contrib(pic_state *);
|
void pic_init_contrib(pic_state *);
|
||||||
void pic_load_piclib(pic_state *);
|
void pic_load_piclib(pic_state *);
|
||||||
|
|
||||||
static pic_value
|
|
||||||
pic_features(pic_state *pic)
|
|
||||||
{
|
|
||||||
pic_get_args(pic, "");
|
|
||||||
|
|
||||||
return pic->features;
|
|
||||||
}
|
|
||||||
|
|
||||||
static pic_value
|
static pic_value
|
||||||
pic_libraries(pic_state *pic)
|
pic_libraries(pic_state *pic)
|
||||||
{
|
{
|
||||||
|
@ -38,10 +30,6 @@ pic_init_picrin(pic_state *pic)
|
||||||
pic_defun(pic, "libraries", pic_libraries);
|
pic_defun(pic, "libraries", pic_libraries);
|
||||||
}
|
}
|
||||||
|
|
||||||
pic_deflibrary (pic, "(scheme base)") {
|
|
||||||
pic_defun(pic, "features", pic_features);
|
|
||||||
}
|
|
||||||
|
|
||||||
pic_init_contrib(pic);
|
pic_init_contrib(pic);
|
||||||
pic_load_piclib(pic);
|
pic_load_piclib(pic);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue