Skip to content

Commit 61fb421

Browse files
committed
shape.c: make internal_object_id extern instead of static
Otherwise every inclusion of shape.h result in a different variable and only the one in `shape.c` is properly initialized.
1 parent eecf5f7 commit 61fb421

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

shape.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747

4848
static ID id_frozen;
4949
static ID id_t_object;
50+
ID internal_object_id; // extern
5051

5152
#define LEAF 0
5253
#define BLACK 0x0

shape.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ typedef uint32_t redblack_id_t;
3939
// ROOT_TOO_COMPLEX_SHAPE_ID 0x2
4040
#define FIRST_T_OBJECT_SHAPE_ID 0x3
4141

42-
static ID internal_object_id;
42+
extern ID internal_object_id;
4343

4444
typedef struct redblack_node redblack_node_t;
4545

0 commit comments

Comments
 (0)