123456789101112131415161718192021222324252627282930313233 |
- #pragma once
- #ifndef BASELIB_ENABLE_SOURCELOCATION
- #ifdef NDEBUG
- #define BASELIB_ENABLE_SOURCELOCATION 0
- #else
- #define BASELIB_ENABLE_SOURCELOCATION 1
- #endif
- #endif
- #ifdef __cplusplus
- BASELIB_C_INTERFACE
- {
- #endif
- typedef struct Baselib_SourceLocation
- {
- const char* file;
- const char* function;
- uint32_t lineNumber;
- } Baselib_SourceLocation;
- #if BASELIB_ENABLE_SOURCELOCATION
- #define BASELIB_SOURCELOCATION Baselib_SourceLocation { __FILE__, __func__, __LINE__ }
- #else
- #define BASELIB_SOURCELOCATION Baselib_SourceLocation { NULL, NULL, 0 }
- #endif
- #ifdef __cplusplus
- }
- #endif
|