|
Soletta™ Framework
|
Macros | |
| #define | _SOL_TYPE_CHECK(type, var, value) ({ type var = (value); var; }) |
| Internal macro to check type of given value. More... | |
| #define | SOL_TYPE_CHECK(type, value) _SOL_TYPE_CHECK(type, __dummy_ ## __COUNTER__, (value)) |
| Macro to check type of given value. More... | |
| #define | SSIZE_MAX LONG_MAX |
| Maximum value of a ssize variable. More... | |
| #define | SSIZE_MIN LONG_MIN |
| Minimum value of a ssize variable. More... | |
Internal macro to check type of given value.
It does so by creating a block with a new variable called var of the given type, assigning the value to it and then returning the variable.
The compiler should issue compile-time type errors if the value doesn't match the type of variable.
| #define SOL_TYPE_CHECK | ( | type, | |
| value | |||
| ) | _SOL_TYPE_CHECK(type, __dummy_ ## __COUNTER__, (value)) |
Macro to check type of given value.
The compiler should issue compile-time type errors if the value doesn't match the type.
It is often used with macros that ends into types such as 'void*' or even variable-arguments (varargs).
Example: set mystruct to hold a string, checking type:
Example: a free that checks if argument is a string
| type | the desired type to check. |
| value | the value to check, it's returned by the macro. |
| #define SSIZE_MAX LONG_MAX |
Maximum value of a ssize variable.
Referenced by sol_memdesc_set_as_int64(), and sol_memdesc_set_as_uint64().
| #define SSIZE_MIN LONG_MIN |
Minimum value of a ssize variable.
1.8.6