We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c5ed52 commit c3c33b3Copy full SHA for c3c33b3
value.h
@@ -1,7 +1,6 @@
1
#ifndef VALUE_H
2
#define VALUE_H
3
4
-#include "bloat.h"
5
#include <stdbool.h>
6
#include <stddef.h>
7
@@ -17,12 +16,6 @@ typedef enum {
17
16
} ValueType;
18
#endif
19
20
-typedef struct Object {
21
- struct Object* next;
22
- bool marked;
23
- Value value;
24
-} Object;
25
-
26
#ifndef VALUE_DEFINED
27
#define VALUE_DEFINED
28
typedef struct {
@@ -37,6 +30,12 @@ typedef struct {
37
30
} Value;
38
31
39
32
33
+typedef struct Object {
34
+ struct Object* next;
35
+ bool marked;
36
+ Value value;
+} Object;
+
40
#define NIL_VAL ((Value){ TYPE_NIL, { .int_val = 0 } })
41
#define BOOL_VAL(v) ((Value){ TYPE_BOOL, { .bool_val = v } })
42
#define INT_VAL(v) ((Value){ TYPE_INT, { .int_val = v } })
0 commit comments