Macros

#define EAPI
 Used to export functions(by changing visibility).
#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.
#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 functions has no effects except the return value and their return value depends only on the parameters and/or global variables.
#define EINA_PRINTF(fmt, arg)
#define EINA_SCANF(fmt, arg)
#define EINA_FORMAT(fmt)
#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)
#define EINA_LIKELY(exp)
#define EINA_SENTINEL
 Attribute from gcc to prevent calls without the necessary NULL sentinel in certain variadic functions.
#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)
 Macro to cast to Eina_Compare_Cb.
#define EINA_EACH_CB(Function)
 Macro to cast to Eina_Each.
#define EINA_FREE_CB(Function)
 Macro to cast to Eina_Free_Cb.
#define EINA_C_ARRAY_LENGTH(arr)
 Macro to return the array length of a standard c array.

Typedefs

typedef unsigned char Eina_Bool
 Type to mimic a boolean.
typedef int(* Eina_Compare_Cb) (const void *data1, const void *data2)
 Function used in functions using sorting.
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.

Variables

EAPI const unsigned int eina_prime_table []

Detailed Description

Macro Definition Documentation

◆ EINA_PRINTF

#define EINA_PRINTF ( fmt,
arg )
Parameters
fmtThe format to be used.
argThe argument to be used.

Referenced by eina_log_print(), eina_strbuf_append_printf(), eina_strbuf_insert_printf(), eina_stringshare_nprintf(), and eina_stringshare_printf().

◆ EINA_SCANF

#define EINA_SCANF ( fmt,
arg )
Parameters
fmtThe format to be used.
argThe argument to be used.

◆ EINA_FORMAT

#define EINA_FORMAT ( fmt)
Parameters
fmtThe format to be used.

◆ EINA_UNLIKELY

#define EINA_UNLIKELY ( exp)
Value:
exp
Parameters
expThe expression to be used.

Referenced by eina_inlist_remove(), eina_log_vprint(), eina_shutdown(), eina_strbuf_replace(), and eina_strbuf_replace_all().

◆ EINA_LIKELY

#define EINA_LIKELY ( exp)
Value:
exp
Parameters
expThe expression to be used.

Referenced by eina_init(), and eina_log_level_set().

◆ EINA_SENTINEL

#define EINA_SENTINEL

Attribute from gcc to prevent calls without the necessary NULL sentinel in certain variadic functions.

Since
1.7.0

◆ EINA_COMPARE_CB

#define EINA_COMPARE_CB ( function)
Value:
((Eina_Compare_Cb)function)
int(* Eina_Compare_Cb)(const void *data1, const void *data2)
Function used in functions using sorting.
Definition eina_types.h:310

Macro to cast to Eina_Compare_Cb.

Referenced by eina_rectangle_pool_request().

◆ EINA_EACH_CB

#define EINA_EACH_CB ( Function)
Value:
((Eina_Each_Cb)Function)
Eina_Bool(* Eina_Each_Cb)(const void *container, void *data, void *fdata)
A callback type used when iterating over a container.
Definition eina_types.h:322

Macro to cast to Eina_Each.

Referenced by eina_hash_foreach().

◆ EINA_FREE_CB

#define EINA_FREE_CB ( Function)
Value:
((Eina_Free_Cb)Function)
void(* Eina_Free_Cb)(void *data)
A callback type used to free data when iterating over a container.
Definition eina_types.h:334

Macro to cast to Eina_Free_Cb.

Referenced by eina_file_open(), and eina_file_open().

◆ EINA_C_ARRAY_LENGTH

#define EINA_C_ARRAY_LENGTH ( arr)
Value:
(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).

Since
1.2.0
Examples
eina_value_02.c.

Typedef Documentation

◆ Eina_Bool

typedef unsigned char Eina_Bool

Type to mimic a boolean.

Note
it differs from stdbool.h as this is defined as an unsigned char to make it usable by bitfields (Eina_Bool name:1) and also take as few bytes as possible.
Examples
eina_array_01.c, eina_array_02.c, eina_hash_01.c, eina_hash_02.c, eina_hash_03.c, eina_hash_04.c, eina_hash_05.c, eina_hash_06.c, eina_hash_07.c, eina_hash_08.c, eina_iterator_01.c, eina_simple_xml_parser_01.c, eina_tiler_01.c, and eina_value_03.c.

◆ Eina_Compare_Cb

typedef int(* Eina_Compare_Cb) (const void *data1, const void *data2)

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.

Examples
eina_list_02.c.