add pic_obj_value function

This commit is contained in:
Yuichi Nishiwaki 2013-10-10 17:05:58 +09:00
parent d21e6714b6
commit 177d2c7098
2 changed files with 13 additions and 0 deletions

View File

@ -35,4 +35,6 @@ struct pic_symbol {
char *name;
};
pic_value pic_obj_value(struct pic_object *obj);
#endif

11
src/value.c Normal file
View File

@ -0,0 +1,11 @@
#include "picrin.h"
pic_value
pic_obj_value(struct pic_object *obj)
{
pic_value v;
v.vtype = PIC_VTYPE_HEAP;
v.u.data = obj;
return v;
}