diff --git a/jim.h b/jim.h index 12f38f0..e0a227a 100644 --- a/jim.h +++ b/jim.h @@ -25,9 +25,9 @@ typedef enum { } Jim_Scope_Kind; typedef struct { - Jim_Scope_Kind kind; - int tail; - int key; + unsigned char kind : 6; + unsigned char tail : 1; + unsigned char key : 1; } Jim_Scope; typedef struct { diff --git a/test.c b/test.c index f25fe59..16f782d 100644 --- a/test.c +++ b/test.c @@ -1,6 +1,7 @@ #include #include #include +#include #define JIM_IMPLEMENTATION #include "./jim.h" @@ -202,6 +203,8 @@ void test(void) int main(int argc, char **argv) { + assert(sizeof(Jim_Scope) == 1); + if (argc >= 2) { if (strcmp(argv[1], "record") == 0) { record("test_expected.h");