diff options
| author | Andre Weissflog <floooh@gmail.com> | 2020-11-28 16:06:41 +0100 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2020-11-28 16:06:41 +0100 |
| commit | 8135988629e1a0df4394201284886b038fa8bc5c (patch) | |
| tree | 9608874a52ab33816a332f77a2c0ca5c350557a4 /sokol_glue.h | |
| parent | 91529a79792ba669c9451c659e65e643540700bf (diff) | |
make SOKOL_IMPL vs SOKOL_xxx_IMPL consistent across all headers (both are supported)
Diffstat (limited to 'sokol_glue.h')
| -rw-r--r-- | sokol_glue.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sokol_glue.h b/sokol_glue.h index 7219b5c1..ef379c58 100644 --- a/sokol_glue.h +++ b/sokol_glue.h @@ -5,7 +5,8 @@ Project URL: https://github.com/floooh/sokol Do this: - #define SOKOL_IMPL + #define SOKOL_IMPL or + #define SOKOL_GLUE_IMPL before you include this file in *one* C or C++ file to create the implementation. @@ -72,12 +73,14 @@ */ #define SOKOL_GLUE_INCLUDED +#if defined(SOKOL_IMPL) && !defined(SOKOL_GLUE_IMPL) +#define SOKOL_GLUE_IMPL +#endif #if defined(SOKOL_API_DECL) && !defined(SOKOL_GLUE_API_DECL) - #define SOKOL_GLUE_API_DECL SOKOL_API_DECL +#define SOKOL_GLUE_API_DECL SOKOL_API_DECL #endif - #ifndef SOKOL_GLUE_API_DECL -#if defined(_WIN32) && defined(SOKOL_DLL) && defined(SOKOL_IMPL) +#if defined(_WIN32) && defined(SOKOL_DLL) && defined(SOKOL_GLUE_IMPL) #define SOKOL_GLUE_API_DECL __declspec(dllexport) #elif defined(_WIN32) && defined(SOKOL_DLL) #define SOKOL_GLUE_API_DECL __declspec(dllimport) @@ -100,7 +103,7 @@ SOKOL_GLUE_API_DECL sg_context_desc sapp_sgcontext(void); #endif /* SOKOL_GLUE_INCLUDED */ /*-- IMPLEMENTATION ----------------------------------------------------------*/ -#ifdef SOKOL_IMPL +#ifdef SOKOL_GLUE_IMPL #define SOKOL_GLUE_IMPL_INCLUDED (1) #include <string.h> /* memset */ @@ -131,4 +134,4 @@ SOKOL_API_IMPL sg_context_desc sapp_sgcontext(void) { } #endif -#endif /* SOKOL_IMPL */ +#endif /* SOKOL_GLUE_IMPL */ |