diff options
| author | Ray <raysan5@gmail.com> | 2018-10-24 22:24:59 +0200 |
|---|---|---|
| committer | Ray <raysan5@gmail.com> | 2018-10-24 22:24:59 +0200 |
| commit | fc6f5a92f3be347383d3b34bb8cdfdae33785f6c (patch) | |
| tree | 62f6acce2b6d82ea8b4d8acd2557980c74a0c591 /src | |
| parent | 72431c6c36a166b00e52527962ab4d978ab0111d (diff) | |
| download | raylib-fc6f5a92f3be347383d3b34bb8cdfdae33785f6c.tar.gz raylib-fc6f5a92f3be347383d3b34bb8cdfdae33785f6c.zip | |
Reviewed functions definition
Diffstat (limited to 'src')
| -rw-r--r-- | src/raymath.h | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/raymath.h b/src/raymath.h index 1d5e26f9..42a45ad6 100644 --- a/src/raymath.h +++ b/src/raymath.h @@ -46,38 +46,31 @@ //#define RAYMATH_HEADER_ONLY // NOTE: To compile functions as static inline, uncomment this line #ifndef RAYMATH_STANDALONE - #include "raylib.h" // Required for structs: Vector3, Matrix + #include "raylib.h" // Required for structs: Vector3, Matrix #endif -#ifdef __cplusplus - #define RMEXTERN extern "C" // Functions visible from other files (no name mangling of functions in C++) -#else - #define RMEXTERN // Functions visible from other files -#endif - -#if defined RAYMATH_IMPLEMENTATION && defined RAYMATH_HEADER_ONLY +#if defined(RAYMATH_IMPLEMENTATION) && defined(RAYMATH_HEADER_ONLY) #error "Specifying both RAYMATH_IMPLEMENTATION and RAYMATH_HEADER_ONLY is contradictory" #endif -#ifdef RAYMATH_IMPLEMENTATION +#if defined(RAYMATH_IMPLEMENTATION) #if defined(_WIN32) && defined(BUILD_LIBTYPE_SHARED) #define RMDEF __declspec(dllexport) extern inline // We are building raylib as a Win32 shared library (.dll). #elif defined(_WIN32) && defined(USE_LIBTYPE_SHARED) - #define RLAPI __declspec(dllimport) // We are using raylib as a Win32 shared library (.dll) + #define RMDEF __declspec(dllimport) // We are using raylib as a Win32 shared library (.dll) #else #define RMDEF extern inline // Provide external definition #endif -#elif defined RAYMATH_HEADER_ONLY +#elif defined(RAYMATH_HEADER_ONLY) #define RMDEF static inline // Functions may be inlined, no external out-of-line definition #else - #ifdef __TINYC__ + #if defined(__TINYC__) #define RMDEF static inline // plain inline not supported by tinycc (See issue #435) #else #define RMDEF inline // Functions may be inlined or external definition used #endif #endif - //---------------------------------------------------------------------------------- // Defines and Macros //---------------------------------------------------------------------------------- |
