inline push_sym macro

This commit is contained in:
Yuichi Nishiwaki 2014-08-07 11:06:38 +09:00
parent 6996b80f10
commit 474a625349
1 changed files with 14 additions and 17 deletions

View File

@ -10,6 +10,20 @@
#include "picrin/macro.h" #include "picrin/macro.h"
#include "picrin/error.h" #include "picrin/error.h"
static pic_value
pic_features(pic_state *pic)
{
pic_value features = pic_nil_value();
pic_get_args(pic, "");
pic_push(pic, pic_sym_value(pic_intern_cstr(pic, "r7rs")), features);
pic_push(pic, pic_sym_value(pic_intern_cstr(pic, "ieee-float")), features);
pic_push(pic, pic_sym_value(pic_intern_cstr(pic, "picrin")), features);
return features;
}
void pic_init_bool(pic_state *); void pic_init_bool(pic_state *);
void pic_init_pair(pic_state *); void pic_init_pair(pic_state *);
void pic_init_port(pic_state *); void pic_init_port(pic_state *);
@ -38,23 +52,6 @@ void pic_init_contrib(pic_state *);
void pic_load_piclib(pic_state *); void pic_load_piclib(pic_state *);
#define push_sym(pic, name, list) \
pic_push(pic, pic_symbol_value(pic_intern_cstr(pic, name)), list)
static pic_value
pic_features(pic_state *pic)
{
pic_value features = pic_nil_value();
pic_get_args(pic, "");
push_sym(pic, "r7rs", features);
push_sym(pic, "ieee-float", features);
push_sym(pic, "picrin", features);
return features;
}
#define DONE pic_gc_arena_restore(pic, ai); #define DONE pic_gc_arena_restore(pic, ai);
void void