mirror of
https://github.com/wiiu-env/WiiUModuleSystem.git
synced 2024-11-25 19:26:53 +01:00
Fix data exports
This commit is contained in:
parent
67582c8e1d
commit
c161712aef
@ -43,18 +43,19 @@ typedef struct wums_entry_t {
|
|||||||
const void *address; /* pointer to the export */
|
const void *address; /* pointer to the export */
|
||||||
} wums_loader_entry_t;
|
} wums_loader_entry_t;
|
||||||
|
|
||||||
#define WUMS_EXPORT_FUNCTION(function) WUMS_EXPORT(WUMS_FUNCTION_EXPORT, function);
|
#define WUMS_EXPORT_FUNCTION(function) WUMS_EXPORT(WUMS_FUNCTION_EXPORT, function, function);
|
||||||
#define WUMS_EXPORT_DATA(pointer) WUMS_EXPORT(WUMS_DATA_EXPORT, pointer);
|
#define WUMS_EXPORT_DATA(pointer) WUMS_EXPORT(WUMS_DATA_EXPORT, pointer, &pointer);
|
||||||
|
|
||||||
#define WUMS_EXPORT(_type, pointer) \
|
#define WUMS_EXPORT(_type, pointer, value) \
|
||||||
extern const wums_loader_entry_t wums_entry_##pointer \
|
extern const wums_loader_entry_t wums_entry_##pointer \
|
||||||
WUMS_SECTION("exports"); \
|
WUMS_SECTION("exports"); \
|
||||||
const wums_loader_entry_t wums_entry_##pointer = { \
|
const wums_loader_entry_t wums_entry_##pointer = { \
|
||||||
.type = _type, \
|
.type = _type, \
|
||||||
.name = # pointer, \
|
.name = # pointer, \
|
||||||
.address = (const void*) pointer \
|
.address = (const void*) value \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user