![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Include dependency graph for macros.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Macros | |
| #define | STR_HELPER(x) #x |
| #define | STR(x) STR_HELPER(x) |
| #define | DT_STRINGIFY_HELPER(x) #x |
| #define | DT_STRINGIFY(x) DT_STRINGIFY_HELPER(x) |
| #define | DT_RESTRICT restrict |
| #define | IS_NULL_PTR(p) |
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on what we compare. We force here a semantic NULL check for pointers types that will fail for anything else than pointers, and make the code more explicit about what is checked. This will fail at compile time on function pointers and anything that is not a pointer. | |
| #define | dt_unreachable_codepath_with_desc(D) dt_unreachable_codepath_with_caller(D, __FILE__, __LINE__, __FUNCTION__) |
| #define | dt_unreachable_codepath() dt_unreachable_codepath_with_caller("unreachable", __FILE__, __LINE__, __FUNCTION__) |
Functions | |
| static void | dt_unreachable_codepath_with_caller (const char *description, const char *file, const int line, const char *function) |
| #define DT_STRINGIFY | ( | x | ) | DT_STRINGIFY_HELPER(x) |
| #define dt_unreachable_codepath | ( | ) | dt_unreachable_codepath_with_caller("unreachable", __FILE__, __LINE__, __FUNCTION__) |
| #define dt_unreachable_codepath_with_desc | ( | D | ) | dt_unreachable_codepath_with_caller(D, __FILE__, __LINE__, __FUNCTION__) |
| #define IS_NULL_PTR | ( | p | ) |
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on what we compare. We force here a semantic NULL check for pointers types that will fail for anything else than pointers, and make the code more explicit about what is checked. This will fail at compile time on function pointers and anything that is not a pointer.
| #define STR | ( | x | ) | STR_HELPER(x) |