generalized attribute

This commit is contained in:
Yuichi Nishiwaki
2014-09-25 11:30:10 +09:00
parent 6fc8341f50
commit 77d4196b06
10 changed files with 81 additions and 56 deletions
+5
View File
@@ -111,6 +111,7 @@ typedef struct {
xhash globals;
xhash macros;
pic_value libs;
xhash attrs;
struct pic_reader *reader;
@@ -224,6 +225,10 @@ static inline void pic_warn(pic_state *pic, const char *msg)
pic_warnf(pic, msg);
}
struct pic_dict *pic_attr(pic_state *, pic_value);
pic_value pic_attr_ref(pic_state *, pic_value, const char *);
void pic_attr_set(pic_state *, pic_value, const char *, pic_value);
struct pic_port *pic_stdin(pic_state *);
struct pic_port *pic_stdout(pic_state *);
struct pic_port *pic_stderr(pic_state *);
-5
View File
@@ -31,7 +31,6 @@ struct pic_proc {
struct pic_irep *irep;
} u;
struct pic_env *env;
struct pic_dict *attr;
};
#define PIC_PROC_KIND_FUNC 1
@@ -51,10 +50,6 @@ struct pic_proc *pic_make_proc_irep(pic_state *, struct pic_irep *, struct pic_e
pic_sym pic_proc_name(struct pic_proc *);
struct pic_dict *pic_attr(pic_state *, struct pic_proc *);
pic_value pic_attr_ref(pic_state *, struct pic_proc *, const char *);
void pic_attr_set(pic_state *, struct pic_proc *, const char *, pic_value);
#if defined(__cplusplus)
}
#endif