Skip to content

Commit 914aab3

Browse files
authored
...
1 parent e083057 commit 914aab3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

value.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ typedef struct {
2525
int int_val;
2626
double float_val;
2727
const char* str_val;
28+
Object* obj;
2829
} data;
29-
Obj* obj;
3030
} Value;
3131
#endif
3232

@@ -47,6 +47,7 @@ typedef struct {
4747
#define AS_INT(v) ((v).data.int_val)
4848
#define AS_FLOAT(v) ((v).data.float_val)
4949
#define AS_STRING(v) ((v).data.str_val)
50+
#define AS_OBJ(v) ((v).data.obj)
5051

5152
void print_value(Value value);
5253
void* reallocate(void* pointer, size_t oldSize, size_t newSize);

0 commit comments

Comments
 (0)