From f0dbd47aadc2873cd8345648e71f74ca0df96ee4 Mon Sep 17 00:00:00 2001 From: Maschell Date: Sun, 12 Nov 2023 12:59:50 +0100 Subject: [PATCH] Allow exports with custom name --- include/wums/exports.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/wums/exports.h b/include/wums/exports.h index fc802c0..a03f7c9 100644 --- a/include/wums/exports.h +++ b/include/wums/exports.h @@ -42,8 +42,10 @@ typedef struct wums_entry_t { const void *address; /* pointer to the export */ } wums_loader_entry_t; -#define WUMS_EXPORT_FUNCTION(function) WUMS_EXPORT(WUMS_FUNCTION_EXPORT, function, function) -#define WUMS_EXPORT_DATA(pointer) WUMS_EXPORT(WUMS_DATA_EXPORT, pointer, &pointer) +#define WUMS_EXPORT_FUNCTION_EX(function, name) WUMS_EXPORT(WUMS_FUNCTION_EXPORT, name, function) +#define WUMS_EXPORT_FUNCTION(function) WUMS_EXPORT_FUNCTION_EX(function, function) +#define WUMS_EXPORT_DATA_EX(pointer, name) WUMS_EXPORT(WUMS_DATA_EXPORT, name, &pointer) +#define WUMS_EXPORT_DATA(pointer) WUMS_EXPORT_DATA_EX(pointer, pointer) #define WUMS_EXPORT(_type, pointer, value) \ extern const wums_loader_entry_t wums_entry_##pointer \