parameter implementation prototype

This commit is contained in:
Yuichi Nishiwaki
2014-01-09 00:38:09 +09:00
parent 88ce10e9fe
commit d7c510ae40
2 changed files with 180 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
#ifndef VAR_H__
#define VAR_H__
#include "picrin.h"
#include "picrin/proc.h"
struct pic_var {
PIC_OBJECT_HEADER
pic_value value;
struct pic_proc *conv;
};
#define pic_var_p(o) (pic_type(o) == PIC_TT_VAR)
#define pic_var_ptr(o) ((struct pic_var *)pic_ptr(o))
struct pic_var *pic_var_new(pic_state *, pic_value, struct pic_proc *);
pic_value pic_var_ref(pic_state *, struct pic_var *);
void pic_var_set(pic_state *, struct pic_var *, pic_value);
void pic_var_set_force(pic_state *, struct pic_var *, pic_value);
#endif