This commit is contained in:
Lior Halphon 2022-07-18 23:22:23 +03:00
parent 09cbf6a13f
commit 110deee6f8
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@
#ifdef __cplusplus
/* For bsnes integration. C++ code does not need section information, and throws a fit over certain types such
as anonymous enums inside unions */
#define GB_SECTION(name, ...) struct __attribute__ ((aligned (8))) { __VA_ARGS__}
#define GB_SECTION(name, ...) struct __attribute__ ((aligned (8))) { __VA_ARGS__ };
#else
#define GB_SECTION(name, ...) union __attribute__ ((aligned (8))) {uint8_t name##_section_start; struct {__VA_ARGS__};}; uint8_t name##_section_end[0];
#define GB_SECTION_OFFSET(name) (offsetof(GB_gameboy_t, name##_section_start))