Definition for eina types and core functions. More...
Macros | |
#define | EINA_API |
Used to export functions (by changing visibility). | |
#define | EINA_API_WEAK |
Weak symbol, primarily useful in defining library functions which can be overridden in user code. More... | |
#define | EWAPI EAPI EINA_API_WEAK |
Weak symbols part of the EFL API. More... | |
#define | EXPORTAPI |
An alias for EINA_API. | |
#define | __WORDSIZE 64 |
Architecture's word size (32 or 64 bits). More... | |
#define | EINA_UNUSED |
Used to indicate that a function parameter is purposely unused. More... | |
#define | EINA_WARN_UNUSED_RESULT |
Used to warn when the returned value of the function is not used. | |
#define | EINA_ARG_NONNULL(...) |
Used to warn when the specified arguments of the function are NULL . More... | |
#define | EINA_DEPRECATED |
Used to warn when the function is considered as deprecated. | |
#define | EINA_MALLOC |
EINA_MALLOC is used to tell the compiler that a function may be treated as if any non-NULL pointer it returns cannot alias any other pointer valid when the function returns and that the memory has undefined content. | |
#define | EINA_PURE |
EINA_PURE is used to tell the compiler this function has no effect except the return value and its return value depends only on the parameters and/or global variables. | |
#define | EINA_PRINTF(fmt, arg) |
Indicates that this function accepts a printf-style format string. More... | |
#define | EINA_SCANF(fmt, arg) |
Indicates that this function accepts a scanf-style format string. More... | |
#define | EINA_FORMAT(fmt) |
Indicates that the output of this function can be used as a format string in printf-style functions. More... | |
#define | EINA_CONST |
Attribute from gcc to prevent the function to read/modify any global memory. | |
#define | EINA_NOINSTRUMENT |
Attribute from gcc to disable instrumentation for a specific function. | |
#define | EINA_UNLIKELY(exp) (exp) |
Indicates that the expression is likely to be FALSE . More... | |
#define | EINA_LIKELY(exp) (exp) |
Indicates that the expression is likely to be TRUE . More... | |
#define | EINA_SENTINEL |
Attribute from gcc to prevent calls without the necessary NULL sentinel in certain variadic functions. More... | |
#define | EINA_FALLTHROUGH |
Attribute from gcc to prevent warning and indicate that we expect to actually go to the next switch statement. More... | |
#define | EINA_PREFETCH(arg) |
Hints that the pointer arg needs to be pre-fetched into cache. More... | |
#define | EINA_PREFETCH_WRITE(arg) |
Hints that the pointer arg needs to be pre-fetched into cache. More... | |
#define | EINA_PREFETCH_NOCACHE(arg) |
Hints that the pointer arg needs to be pre-fetched into cache. More... | |
#define | EINA_PREFETCH_NOCACHE_WRITE(arg) |
Hints that the pointer arg needs to be pre-fetched into cache. More... | |
#define | EINA_FALSE ((Eina_Bool)0) |
boolean value FALSE (numerical value 0) | |
#define | EINA_TRUE ((Eina_Bool)1) |
boolean value TRUE (numerical value 1) | |
#define | EINA_COMPARE_CB(function) ((Eina_Compare_Cb)function) |
Macro to cast to Eina_Compare_Cb. | |
#define | EINA_RANDOM_CB(function) ((Eina_Random_Cb)function) |
Macro to cast to Eina_Random_Cb. | |
#define | EINA_PROCESS_CB(Function) ((Eina_Process_Cb)Function) |
Macro to cast to Eina_Process. | |
#define | EINA_EACH_CB(Function) ((Eina_Each_Cb)Function) |
Macro to cast to Eina_Each. | |
#define | EINA_FREE_CB(Function) ((Eina_Free_Cb)Function) |
Macro to cast to Eina_Free_Cb. | |
#define | EINA_C_ARRAY_LENGTH(arr) (sizeof(arr) / sizeof((arr)[0])) |
Macro to return the array length of a standard c array. More... | |
#define | EINA_DOUBLE_EQUAL(x, y) (fabs((x) - (y)) <= (2.2204460492503131e-16) * fabs((x))) |
Macro to compare 2 double floating point values and deal with precision loss issues. More... | |
Typedefs | |
typedef unsigned char | Eina_Bool |
Type to mimic a boolean. More... | |
typedef int(* | Eina_Compare_Cb) (const void *data1, const void *data2) |
Function used in functions using sorting. More... | |
typedef int(* | Eina_Random_Cb) (const int min, const int max) |
Function used in shuffling functions. More... | |
typedef void *(* | Eina_Process_Cb) (const void *container, void *data, void *fdata) |
Method that processes some data and returns new data. More... | |
typedef Eina_Bool(* | Eina_Each_Cb) (const void *container, void *data, void *fdata) |
A callback type used when iterating over a container. | |
typedef void(* | Eina_Free_Cb) (void *data) |
A callback type used to free data when iterating over a container. | |
Definition for eina types and core functions.
#define EINA_API_WEAK |
Weak symbol, primarily useful in defining library functions which can be overridden in user code.
Note: Not supported on all platforms.
#define EWAPI EAPI EINA_API_WEAK |
Weak symbols part of the EFL API.
Note: Not supported on all platforms.
#define __WORDSIZE 64 |
Architecture's word size (32 or 64 bits).
Defined by Eina if its definition cannot be found in the system's headers.
#define EINA_UNUSED |
Used to indicate that a function parameter is purposely unused.
This silences some compiler's warning about unused parameters.
#define EINA_ARG_NONNULL | ( | ... | ) |
Used to warn when the specified arguments of the function are NULL
.
[in] | ... | Ordinals of the parameters to check for nullity (1..n) |
#define EINA_PRINTF | ( | fmt, | |
arg | |||
) |
Indicates that this function accepts a printf-style format string.
This allows some compilers to perform additional checks on the parameters passed to the function.
[in] | fmt | The 1-based index of the parameter specifying the format string. |
[in] | arg | The 1-based index of the first data parameter. |
#define EINA_SCANF | ( | fmt, | |
arg | |||
) |
Indicates that this function accepts a scanf-style format string.
This allows some compilers to perform additional checks on the parameters passed to the function.
[in] | fmt | The 1-based index of the parameter specifying the format string. |
[in] | arg | The 1-based index of the first data parameter. |
#define EINA_FORMAT | ( | fmt | ) |
Indicates that the output of this function can be used as a format string in printf-style functions.
Some compilers will check that the return value of this function is consistent with the fmt
parameter.
[in] | fmt | The 1-based index of the parameter specifying the format string. |
#define EINA_UNLIKELY | ( | exp | ) | (exp) |
Indicates that the expression is likely to be FALSE
.
Some compilers and processor architectures can then optimize the more likely path.
[in] | exp | The expression to be used. |
#define EINA_LIKELY | ( | exp | ) | (exp) |
Indicates that the expression is likely to be TRUE
.
Some compilers and processor architectures can then optimize the more likely path.
[in] | exp | The expression to be used. |
#define EINA_SENTINEL |
Attribute from gcc to prevent calls without the necessary NULL sentinel in certain variadic functions.
#define EINA_FALLTHROUGH |
Attribute from gcc to prevent warning and indicate that we expect to actually go to the next switch statement.
#define EINA_PREFETCH | ( | arg | ) |
Hints that the pointer arg
needs to be pre-fetched into cache.
This hints to the compiler to probably issue a prefetch command for the memory address arg
and ensure it goes into all levels of cache. For just writing to an address look at EINA_PREFETCH_WRITE().
Note that the pointer arg
does not have to be a valid pointer and will not cause any exceptions (like segfaults) if it is invalid.
#define EINA_PREFETCH_WRITE | ( | arg | ) |
Hints that the pointer arg
needs to be pre-fetched into cache.
This hints to the compiler to probably issue a prefetch command for the memory address arg
and ensure it goes into all levels of cache. This specifically indicates that the address is going to be written to as opposed to being read from as with EINA_PREFETCH().
Note that the pointer arg
does not have to be a valid pointer and will not cause any exceptions (like segfaults) if it is invalid.
#define EINA_PREFETCH_NOCACHE | ( | arg | ) |
Hints that the pointer arg
needs to be pre-fetched into cache.
This hints to the compiler to probably issue a prefetch command for the memory address arg
and ensure it goes into just the closest(l1) cache. For just writing to an address look at EINA_PREFETCH_WRITE_NOCACHE().
Note that the pointer arg
does not have to be a valid pointer and will not cause any exceptions (like segfaults) if it is invalid.
#define EINA_PREFETCH_NOCACHE_WRITE | ( | arg | ) |
Hints that the pointer arg
needs to be pre-fetched into cache.
This hints to the compiler to probably issue a prefetch command for the memory address arg
and ensure it goes into just the closest(l1) cache. This specifically indicates that the address is going to be written to as opposed to being read from as with EINA_PREFETCH_NOCACHE(). Note that the pointer arg
does not have to be a valid pointer and will not cause any exceptions (like segfaults) if it is invalid.
#define EINA_C_ARRAY_LENGTH | ( | arr | ) | (sizeof(arr) / sizeof((arr)[0])) |
Macro to return the array length of a standard c array.
For example: int foo[] = { 0, 1, 2, 3 }; would return 4 and not 4 * sizeof(int).
#define EINA_DOUBLE_EQUAL | ( | x, | |
y | |||
) | (fabs((x) - (y)) <= (2.2204460492503131e-16) * fabs((x))) |
Macro to compare 2 double floating point values and deal with precision loss issues.
Type to mimic a boolean.
Eina_Compare_Cb |
Function used in functions using sorting.
It compares data1
and data2
. If data1
is 'less' than data2
, -1 must be returned, if it is 'greater', 1 must be returned, and if they are equal, 0 must be returned.
Eina_Random_Cb |
Function used in shuffling functions.
An integer between min and max inclusive must be returned.
Eina_Process_Cb |
Method that processes some data and returns new data.
It's meant to be used as a callback to process all nodes inside a container (See eina_iterator_processed_new, for example.)
data | The data to process. |
fdata | Context data. |