diff options
author | Felipe Magno de Almeida <felipe@expertise.dev> | 2020-11-25 09:35:48 -0300 |
---|---|---|
committer | Felipe Magno de Almeida <felipe@expertise.dev> | 2020-11-25 09:42:47 -0300 |
commit | ccc1849263d8019c712e0fee02673de15f30b3c5 (patch) | |
tree | 2ba060a4889090a8a86b707cd666d3f4ad1a7e41 | |
parent | 6b1f281f175a68dc50c788010f47bc4e256905d1 (diff) |
eina: Rename EAPI macro to EINA_API in Eina library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
EAPI is the only solution that worked for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: jptiz, lucas, woohyun, vtorri, raster
Reviewed By: jptiz, lucas, vtorri
Subscribers: ProhtMeyhet, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12188
142 files changed, 1742 insertions, 1781 deletions
diff --git a/src/lib/eina/Eina.h b/src/lib/eina/Eina.h index d7b4c1911a..383696d7d8 100644 --- a/src/lib/eina/Eina.h +++ b/src/lib/eina/Eina.h | |||
@@ -278,8 +278,6 @@ extern "C" { | |||
278 | #include <eina_vpath.h> | 278 | #include <eina_vpath.h> |
279 | #include <eina_abstract_content.h> | 279 | #include <eina_abstract_content.h> |
280 | 280 | ||
281 | #undef EAPI | ||
282 | #define EAPI | ||
283 | 281 | ||
284 | #ifdef __cplusplus | 282 | #ifdef __cplusplus |
285 | } | 283 | } |
diff --git a/src/lib/eina/eina_abi.c b/src/lib/eina/eina_abi.c index cdf0f9f450..35d93a51e3 100644 --- a/src/lib/eina/eina_abi.c +++ b/src/lib/eina/eina_abi.c | |||
@@ -25,12 +25,12 @@ | |||
25 | #include "eina_unicode.h" | 25 | #include "eina_unicode.h" |
26 | #include "eina_safety_checks.h" | 26 | #include "eina_safety_checks.h" |
27 | 27 | ||
28 | EAPI Eina_Unicode eina_unicode_utf8_get_next(const char *buf, int *iindex) | 28 | EINA_API Eina_Unicode eina_unicode_utf8_get_next(const char *buf, int *iindex) |
29 | { | 29 | { |
30 | return eina_unicode_utf8_next_get(buf, iindex); | 30 | return eina_unicode_utf8_next_get(buf, iindex); |
31 | } | 31 | } |
32 | 32 | ||
33 | EAPI unsigned int | 33 | EINA_API unsigned int |
34 | eina_mempool_alignof(unsigned int size) | 34 | eina_mempool_alignof(unsigned int size) |
35 | { | 35 | { |
36 | unsigned int align; | 36 | unsigned int align; |
diff --git a/src/lib/eina/eina_abstract_content.c b/src/lib/eina/eina_abstract_content.c index 8ed4dc5a48..02d246bed3 100644 --- a/src/lib/eina/eina_abstract_content.c +++ b/src/lib/eina/eina_abstract_content.c | |||
@@ -12,7 +12,7 @@ struct _Eina_Content | |||
12 | const char *file; | 12 | const char *file; |
13 | EINA_REFCOUNT; | 13 | EINA_REFCOUNT; |
14 | }; | 14 | }; |
15 | EAPI const Eina_Value_Type *EINA_VALUE_TYPE_CONTENT; | 15 | EINA_API const Eina_Value_Type *EINA_VALUE_TYPE_CONTENT; |
16 | 16 | ||
17 | static int _eina_abstract_content_log_domain = -1; | 17 | static int _eina_abstract_content_log_domain = -1; |
18 | 18 | ||
@@ -39,7 +39,7 @@ _eina_content_ref(Eina_Content *content) | |||
39 | EINA_REFCOUNT_REF(content); | 39 | EINA_REFCOUNT_REF(content); |
40 | } | 40 | } |
41 | 41 | ||
42 | EAPI Eina_Bool | 42 | EINA_API Eina_Bool |
43 | eina_content_converter_conversion_register(const char *from, const char *to, Eina_Content_Conversion_Callback conversion) | 43 | eina_content_converter_conversion_register(const char *from, const char *to, Eina_Content_Conversion_Callback conversion) |
44 | { | 44 | { |
45 | Eina_Content_Conversion_Node *node = calloc(1, sizeof(Eina_Content_Conversion_Node)); | 45 | Eina_Content_Conversion_Node *node = calloc(1, sizeof(Eina_Content_Conversion_Node)); |
@@ -93,7 +93,7 @@ end: | |||
93 | return result; | 93 | return result; |
94 | } | 94 | } |
95 | 95 | ||
96 | EAPI Eina_Bool | 96 | EINA_API Eina_Bool |
97 | eina_content_converter_convert_can(const char *from, const char *to) | 97 | eina_content_converter_convert_can(const char *from, const char *to) |
98 | { | 98 | { |
99 | return !!_conversion_callback_fetch(from, to); | 99 | return !!_conversion_callback_fetch(from, to); |
@@ -107,7 +107,7 @@ _process_cb(const void *container EINA_UNUSED, void *data, void *fdata EINA_UNUS | |||
107 | return n->to; | 107 | return n->to; |
108 | } | 108 | } |
109 | 109 | ||
110 | EAPI Eina_Iterator* | 110 | EINA_API Eina_Iterator* |
111 | eina_content_converter_possible_conversions(const char *from) | 111 | eina_content_converter_possible_conversions(const char *from) |
112 | { | 112 | { |
113 | Eina_List *possibilities = _conversion_callback_fetch_possible(from); | 113 | Eina_List *possibilities = _conversion_callback_fetch_possible(from); |
@@ -115,7 +115,7 @@ eina_content_converter_possible_conversions(const char *from) | |||
115 | return eina_iterator_processed_new(eina_list_iterator_new(possibilities) , EINA_PROCESS_CB(_process_cb), NULL, possibilities); | 115 | return eina_iterator_processed_new(eina_list_iterator_new(possibilities) , EINA_PROCESS_CB(_process_cb), NULL, possibilities); |
116 | } | 116 | } |
117 | 117 | ||
118 | EAPI Eina_Content* | 118 | EINA_API Eina_Content* |
119 | eina_content_new(Eina_Slice data, const char *type) | 119 | eina_content_new(Eina_Slice data, const char *type) |
120 | { | 120 | { |
121 | Eina_Content *content; | 121 | Eina_Content *content; |
@@ -149,7 +149,7 @@ err: | |||
149 | return NULL; | 149 | return NULL; |
150 | } | 150 | } |
151 | 151 | ||
152 | EAPI void | 152 | EINA_API void |
153 | eina_content_free(Eina_Content *content) | 153 | eina_content_free(Eina_Content *content) |
154 | { | 154 | { |
155 | EINA_REFCOUNT_UNREF(content) | 155 | EINA_REFCOUNT_UNREF(content) |
@@ -161,7 +161,7 @@ eina_content_free(Eina_Content *content) | |||
161 | } | 161 | } |
162 | } | 162 | } |
163 | 163 | ||
164 | EAPI const char* | 164 | EINA_API const char* |
165 | eina_content_as_file(Eina_Content *content) | 165 | eina_content_as_file(Eina_Content *content) |
166 | { | 166 | { |
167 | if (!content->file) | 167 | if (!content->file) |
@@ -189,19 +189,19 @@ eina_content_as_file(Eina_Content *content) | |||
189 | return content->file; | 189 | return content->file; |
190 | } | 190 | } |
191 | 191 | ||
192 | EAPI const char* | 192 | EINA_API const char* |
193 | eina_content_type_get(Eina_Content *content) | 193 | eina_content_type_get(Eina_Content *content) |
194 | { | 194 | { |
195 | return content->type; | 195 | return content->type; |
196 | } | 196 | } |
197 | 197 | ||
198 | EAPI Eina_Slice | 198 | EINA_API Eina_Slice |
199 | eina_content_data_get(Eina_Content *content) | 199 | eina_content_data_get(Eina_Content *content) |
200 | { | 200 | { |
201 | return eina_rw_slice_slice_get(content->data); | 201 | return eina_rw_slice_slice_get(content->data); |
202 | } | 202 | } |
203 | 203 | ||
204 | EAPI Eina_Content* | 204 | EINA_API Eina_Content* |
205 | eina_content_convert(Eina_Content *content, const char *new_type) | 205 | eina_content_convert(Eina_Content *content, const char *new_type) |
206 | { | 206 | { |
207 | Eina_Content_Conversion_Callback callback = _conversion_callback_fetch(content->type, new_type); | 207 | Eina_Content_Conversion_Callback callback = _conversion_callback_fetch(content->type, new_type); |
@@ -370,7 +370,7 @@ _eina_value_type_content_pget(const Eina_Value_Type *type EINA_UNUSED, const voi | |||
370 | return EINA_TRUE; | 370 | return EINA_TRUE; |
371 | } | 371 | } |
372 | 372 | ||
373 | EAPI const Eina_Value_Type _EINA_VALUE_TYPE_CONTENT ={ | 373 | EINA_API const Eina_Value_Type _EINA_VALUE_TYPE_CONTENT ={ |
374 | EINA_VALUE_TYPE_VERSION, | 374 | EINA_VALUE_TYPE_VERSION, |
375 | sizeof(Eina_Content*), | 375 | sizeof(Eina_Content*), |
376 | "Eina_Abstract_Content", | 376 | "Eina_Abstract_Content", |
diff --git a/src/lib/eina/eina_abstract_content.h b/src/lib/eina/eina_abstract_content.h index 1d88e868a3..580ed97242 100644 --- a/src/lib/eina/eina_abstract_content.h +++ b/src/lib/eina/eina_abstract_content.h | |||
@@ -33,7 +33,7 @@ typedef Eina_Content* (*Eina_Content_Conversion_Callback)(Eina_Content *from, co | |||
33 | * @return The path to the file. Do not free this. | 33 | * @return The path to the file. Do not free this. |
34 | * | 34 | * |
35 | */ | 35 | */ |
36 | EAPI const char* eina_content_as_file(Eina_Content *content); | 36 | EINA_API const char* eina_content_as_file(Eina_Content *content); |
37 | 37 | ||
38 | /** | 38 | /** |
39 | * Convert the content of the object to another type. | 39 | * Convert the content of the object to another type. |
@@ -45,7 +45,7 @@ EAPI const char* eina_content_as_file(Eina_Content *content); | |||
45 | * | 45 | * |
46 | * @return A new content object. The caller of this function is owning this. | 46 | * @return A new content object. The caller of this function is owning this. |
47 | */ | 47 | */ |
48 | EAPI Eina_Content* eina_content_convert(Eina_Content *content, const char *new_type); | 48 | EINA_API Eina_Content* eina_content_convert(Eina_Content *content, const char *new_type); |
49 | 49 | ||
50 | /** | 50 | /** |
51 | * Get the type of the passed content. | 51 | * Get the type of the passed content. |
@@ -54,7 +54,7 @@ EAPI Eina_Content* eina_content_convert(Eina_Content *content, const char *new_t | |||
54 | * | 54 | * |
55 | * @return The type of this content. Do no free this. | 55 | * @return The type of this content. Do no free this. |
56 | */ | 56 | */ |
57 | EAPI const char* eina_content_type_get(Eina_Content *content); | 57 | EINA_API const char* eina_content_type_get(Eina_Content *content); |
58 | 58 | ||
59 | /** | 59 | /** |
60 | * Get the Eina_Slice of the passed content. | 60 | * Get the Eina_Slice of the passed content. |
@@ -63,7 +63,7 @@ EAPI const char* eina_content_type_get(Eina_Content *content); | |||
63 | * | 63 | * |
64 | * @return An Eina_Slice containing the data. Do not free. | 64 | * @return An Eina_Slice containing the data. Do not free. |
65 | */ | 65 | */ |
66 | EAPI Eina_Slice eina_content_data_get(Eina_Content *content); | 66 | EINA_API Eina_Slice eina_content_data_get(Eina_Content *content); |
67 | 67 | ||
68 | /** | 68 | /** |
69 | * Create a new content object, with the provided data and type. | 69 | * Create a new content object, with the provided data and type. |
@@ -73,14 +73,14 @@ EAPI Eina_Slice eina_content_data_get(Eina_Content *content); | |||
73 | * | 73 | * |
74 | * @return The new content object. The caller owns this object. | 74 | * @return The new content object. The caller owns this object. |
75 | */ | 75 | */ |
76 | EAPI Eina_Content* eina_content_new(Eina_Slice data, const char *type); | 76 | EINA_API Eina_Content* eina_content_new(Eina_Slice data, const char *type); |
77 | 77 | ||
78 | /** | 78 | /** |
79 | * Free the content object. | 79 | * Free the content object. |
80 | * | 80 | * |
81 | * @param[in] content The content to free. | 81 | * @param[in] content The content to free. |
82 | */ | 82 | */ |
83 | EAPI void eina_content_free(Eina_Content *content); | 83 | EINA_API void eina_content_free(Eina_Content *content); |
84 | 84 | ||
85 | /** | 85 | /** |
86 | * Register a new conversion callback. | 86 | * Register a new conversion callback. |
@@ -90,7 +90,7 @@ EAPI void eina_content_free(Eina_Content *content); | |||
90 | * | 90 | * |
91 | * @return True if the callback was successfully registered. | 91 | * @return True if the callback was successfully registered. |
92 | */ | 92 | */ |
93 | EAPI Eina_Bool eina_content_converter_conversion_register(const char *from, const char *to, Eina_Content_Conversion_Callback convertion); | 93 | EINA_API Eina_Bool eina_content_converter_conversion_register(const char *from, const char *to, Eina_Content_Conversion_Callback convertion); |
94 | 94 | ||
95 | /** | 95 | /** |
96 | * Check if a specific conversion can be performed. | 96 | * Check if a specific conversion can be performed. |
@@ -102,7 +102,7 @@ EAPI Eina_Bool eina_content_converter_conversion_register(const char *from, cons | |||
102 | * | 102 | * |
103 | * @return True if the conversion can be performed. | 103 | * @return True if the conversion can be performed. |
104 | */ | 104 | */ |
105 | EAPI Eina_Bool eina_content_converter_convert_can(const char *from, const char *to); | 105 | EINA_API Eina_Bool eina_content_converter_convert_can(const char *from, const char *to); |
106 | 106 | ||
107 | /** | 107 | /** |
108 | * Returns an iterator containing all the target types that the provided source type can be converted to. | 108 | * Returns an iterator containing all the target types that the provided source type can be converted to. |
@@ -111,9 +111,9 @@ EAPI Eina_Bool eina_content_converter_convert_can(const char *from, const char * | |||
111 | * | 111 | * |
112 | * @return An Iterator containing MIME type strings. Free this via eina_iterator_free. | 112 | * @return An Iterator containing MIME type strings. Free this via eina_iterator_free. |
113 | */ | 113 | */ |
114 | EAPI Eina_Iterator* eina_content_converter_possible_conversions(const char *from); | 114 | EINA_API Eina_Iterator* eina_content_converter_possible_conversions(const char *from); |
115 | 115 | ||
116 | EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_CONTENT; | 116 | EINA_API extern const Eina_Value_Type *EINA_VALUE_TYPE_CONTENT; |
117 | 117 | ||
118 | /** | 118 | /** |
119 | * Convert the Eina_Content object to an Eina_Value. | 119 | * Convert the Eina_Content object to an Eina_Value. |
@@ -122,7 +122,7 @@ EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_CONTENT; | |||
122 | * | 122 | * |
123 | * @return An newly-allocated Eina_Value. Caller owns it. | 123 | * @return An newly-allocated Eina_Value. Caller owns it. |
124 | */ | 124 | */ |
125 | EAPI Eina_Value* eina_value_content_new(Eina_Content *content); | 125 | EINA_API Eina_Value* eina_value_content_new(Eina_Content *content); |
126 | 126 | ||
127 | /** | 127 | /** |
128 | * Creates an Eina_Value from an Eina_Content. | 128 | * Creates an Eina_Value from an Eina_Content. |
@@ -131,7 +131,7 @@ EAPI Eina_Value* eina_value_content_new(Eina_Content *content); | |||
131 | * | 131 | * |
132 | * @return An Eina_Value with type EINA_VALUE_TYPE_CONTENT. | 132 | * @return An Eina_Value with type EINA_VALUE_TYPE_CONTENT. |
133 | */ | 133 | */ |
134 | EAPI Eina_Value eina_value_content_init(Eina_Content *content); | 134 | EINA_API Eina_Value eina_value_content_init(Eina_Content *content); |
135 | 135 | ||
136 | /** | 136 | /** |
137 | * Gets the content from the Eina_Value. | 137 | * Gets the content from the Eina_Value. |
@@ -142,7 +142,7 @@ EAPI Eina_Value eina_value_content_init(Eina_Content *content); | |||
142 | * | 142 | * |
143 | * @return A newly-allocated Eina_Content. Caller owns it. | 143 | * @return A newly-allocated Eina_Content. Caller owns it. |
144 | */ | 144 | */ |
145 | EAPI Eina_Content* eina_value_to_content(const Eina_Value *value); | 145 | EINA_API Eina_Content* eina_value_to_content(const Eina_Value *value); |
146 | 146 | ||
147 | 147 | ||
148 | static inline Eina_Iterator* | 148 | static inline Eina_Iterator* |
diff --git a/src/lib/eina/eina_accessor.c b/src/lib/eina/eina_accessor.c index 812da5c9c1..f6b4fb6221 100644 --- a/src/lib/eina/eina_accessor.c +++ b/src/lib/eina/eina_accessor.c | |||
@@ -92,7 +92,7 @@ eina_accessor_shutdown(void) | |||
92 | *============================================================================*/ | 92 | *============================================================================*/ |
93 | 93 | ||
94 | 94 | ||
95 | EAPI void | 95 | EINA_API void |
96 | eina_accessor_free(Eina_Accessor *accessor) | 96 | eina_accessor_free(Eina_Accessor *accessor) |
97 | { | 97 | { |
98 | if (!accessor) | 98 | if (!accessor) |
@@ -103,7 +103,7 @@ eina_accessor_free(Eina_Accessor *accessor) | |||
103 | accessor->free(accessor); | 103 | accessor->free(accessor); |
104 | } | 104 | } |
105 | 105 | ||
106 | EAPI void * | 106 | EINA_API void * |
107 | eina_accessor_container_get(Eina_Accessor *accessor) | 107 | eina_accessor_container_get(Eina_Accessor *accessor) |
108 | { | 108 | { |
109 | EINA_MAGIC_CHECK_ACCESSOR(accessor); | 109 | EINA_MAGIC_CHECK_ACCESSOR(accessor); |
@@ -112,7 +112,7 @@ eina_accessor_container_get(Eina_Accessor *accessor) | |||
112 | return accessor->get_container(accessor); | 112 | return accessor->get_container(accessor); |
113 | } | 113 | } |
114 | 114 | ||
115 | EAPI Eina_Bool | 115 | EINA_API Eina_Bool |
116 | eina_accessor_data_get(Eina_Accessor *accessor, | 116 | eina_accessor_data_get(Eina_Accessor *accessor, |
117 | unsigned int position, | 117 | unsigned int position, |
118 | void **data) | 118 | void **data) |
@@ -124,7 +124,7 @@ eina_accessor_data_get(Eina_Accessor *accessor, | |||
124 | return accessor->get_at(accessor, position, data); | 124 | return accessor->get_at(accessor, position, data); |
125 | } | 125 | } |
126 | 126 | ||
127 | EAPI void | 127 | EINA_API void |
128 | eina_accessor_over(Eina_Accessor *accessor, | 128 | eina_accessor_over(Eina_Accessor *accessor, |
129 | Eina_Each_Cb cb, | 129 | Eina_Each_Cb cb, |
130 | unsigned int start, | 130 | unsigned int start, |
@@ -156,7 +156,7 @@ eina_accessor_over(Eina_Accessor *accessor, | |||
156 | (void) eina_accessor_unlock(accessor); | 156 | (void) eina_accessor_unlock(accessor); |
157 | } | 157 | } |
158 | 158 | ||
159 | EAPI Eina_Bool | 159 | EINA_API Eina_Bool |
160 | eina_accessor_lock(Eina_Accessor *accessor) | 160 | eina_accessor_lock(Eina_Accessor *accessor) |
161 | { | 161 | { |
162 | EINA_MAGIC_CHECK_ACCESSOR(accessor); | 162 | EINA_MAGIC_CHECK_ACCESSOR(accessor); |
@@ -167,7 +167,7 @@ eina_accessor_lock(Eina_Accessor *accessor) | |||
167 | return EINA_TRUE; | 167 | return EINA_TRUE; |
168 | } | 168 | } |
169 | 169 | ||
170 | EAPI Eina_Accessor* | 170 | EINA_API Eina_Accessor* |
171 | eina_accessor_clone(Eina_Accessor *accessor) | 171 | eina_accessor_clone(Eina_Accessor *accessor) |
172 | { | 172 | { |
173 | EINA_MAGIC_CHECK_ACCESSOR(accessor); | 173 | EINA_MAGIC_CHECK_ACCESSOR(accessor); |
@@ -179,7 +179,7 @@ eina_accessor_clone(Eina_Accessor *accessor) | |||
179 | return NULL; | 179 | return NULL; |
180 | } | 180 | } |
181 | 181 | ||
182 | EAPI Eina_Bool | 182 | EINA_API Eina_Bool |
183 | eina_accessor_unlock(Eina_Accessor *accessor) | 183 | eina_accessor_unlock(Eina_Accessor *accessor) |
184 | { | 184 | { |
185 | EINA_MAGIC_CHECK_ACCESSOR(accessor); | 185 | EINA_MAGIC_CHECK_ACCESSOR(accessor); |
@@ -235,7 +235,7 @@ eina_carray_length_accessor_free(Eina_Accessor_CArray_Length *accessor) | |||
235 | free(accessor); | 235 | free(accessor); |
236 | } | 236 | } |
237 | 237 | ||
238 | EAPI Eina_Accessor * | 238 | EINA_API Eina_Accessor * |
239 | eina_carray_length_accessor_new(void** array, unsigned int step, unsigned int length) | 239 | eina_carray_length_accessor_new(void** array, unsigned int step, unsigned int length) |
240 | { | 240 | { |
241 | Eina_Accessor_CArray_Length *accessor; | 241 | Eina_Accessor_CArray_Length *accessor; |
@@ -258,7 +258,7 @@ eina_carray_length_accessor_new(void** array, unsigned int step, unsigned int le | |||
258 | return &accessor->accessor; | 258 | return &accessor->accessor; |
259 | } | 259 | } |
260 | 260 | ||
261 | EAPI Eina_Accessor * | 261 | EINA_API Eina_Accessor * |
262 | eina_carray_length_ptr_accessor_new(void** array, unsigned int step, unsigned int length) | 262 | eina_carray_length_ptr_accessor_new(void** array, unsigned int step, unsigned int length) |
263 | { | 263 | { |
264 | Eina_Accessor_CArray_Length *accessor; | 264 | Eina_Accessor_CArray_Length *accessor; |
diff --git a/src/lib/eina/eina_accessor.h b/src/lib/eina/eina_accessor.h index 5e61dc7810..c70f8ed495 100644 --- a/src/lib/eina/eina_accessor.h +++ b/src/lib/eina/eina_accessor.h | |||
@@ -205,7 +205,7 @@ struct _Eina_Accessor | |||
205 | * @param[in] accessor The accessor to free | 205 | * @param[in] accessor The accessor to free |
206 | * | 206 | * |
207 | */ | 207 | */ |
208 | EAPI void eina_accessor_free(Eina_Accessor *accessor); | 208 | EINA_API void eina_accessor_free(Eina_Accessor *accessor); |
209 | 209 | ||
210 | /** | 210 | /** |
211 | * @brief Gets the data of an accessor at the given position. | 211 | * @brief Gets the data of an accessor at the given position. |
@@ -219,7 +219,7 @@ EAPI void eina_accessor_free(Eina_Accessor *accessor); | |||
219 | * @return #EINA_TRUE on success, otherwise #EINA_FALSE | 219 | * @return #EINA_TRUE on success, otherwise #EINA_FALSE |
220 | * | 220 | * |
221 | */ | 221 | */ |
222 | EAPI Eina_Bool eina_accessor_data_get(Eina_Accessor *accessor, | 222 | EINA_API Eina_Bool eina_accessor_data_get(Eina_Accessor *accessor, |
223 | unsigned int position, | 223 | unsigned int position, |
224 | void **data) EINA_ARG_NONNULL(1); | 224 | void **data) EINA_ARG_NONNULL(1); |
225 | 225 | ||
@@ -231,7 +231,7 @@ EAPI Eina_Bool eina_accessor_data_get(Eina_Accessor *accessor, | |||
231 | * @return The container that created the accessor | 231 | * @return The container that created the accessor |
232 | * | 232 | * |
233 | */ | 233 | */ |
234 | EAPI void *eina_accessor_container_get(Eina_Accessor *accessor) EINA_ARG_NONNULL(1) EINA_PURE; | 234 | EINA_API void *eina_accessor_container_get(Eina_Accessor *accessor) EINA_ARG_NONNULL(1) EINA_PURE; |
235 | 235 | ||
236 | /** | 236 | /** |
237 | * @brief Iterates over the container and executes a callback on the chosen elements. | 237 | * @brief Iterates over the container and executes a callback on the chosen elements. |
@@ -249,7 +249,7 @@ EAPI void *eina_accessor_container_get(Eina_Accessor *accessor) EINA_ARG_NONNULL | |||
249 | * @param[in] fdata The data passed to the callback | 249 | * @param[in] fdata The data passed to the callback |
250 | * | 250 | * |
251 | */ | 251 | */ |
252 | EAPI void eina_accessor_over(Eina_Accessor *accessor, | 252 | EINA_API void eina_accessor_over(Eina_Accessor *accessor, |
253 | Eina_Each_Cb cb, | 253 | Eina_Each_Cb cb, |
254 | unsigned int start, | 254 | unsigned int start, |
255 | unsigned int end, | 255 | unsigned int end, |
@@ -269,7 +269,7 @@ EAPI void eina_accessor_over(Eina_Accessor *accessor, | |||
269 | * | 269 | * |
270 | * @warning None of the existing eina data structures are lockable. | 270 | * @warning None of the existing eina data structures are lockable. |
271 | */ | 271 | */ |
272 | EAPI Eina_Bool eina_accessor_lock(Eina_Accessor *accessor) EINA_ARG_NONNULL(1); | 272 | EINA_API Eina_Bool eina_accessor_lock(Eina_Accessor *accessor) EINA_ARG_NONNULL(1); |
273 | 273 | ||
274 | /** | 274 | /** |
275 | * @brief Clones the container of the accessor. | 275 | * @brief Clones the container of the accessor. |
@@ -278,7 +278,7 @@ EAPI Eina_Bool eina_accessor_lock(Eina_Accessor *accessor) EINA_ARG_NONNULL(1); | |||
278 | * @return Another accessor | 278 | * @return Another accessor |
279 | * @since 1.10 | 279 | * @since 1.10 |
280 | */ | 280 | */ |
281 | EAPI Eina_Accessor* eina_accessor_clone(Eina_Accessor *accessor) EINA_ARG_NONNULL(1); | 281 | EINA_API Eina_Accessor* eina_accessor_clone(Eina_Accessor *accessor) EINA_ARG_NONNULL(1); |
282 | 282 | ||
283 | /** | 283 | /** |
284 | * @brief Unlocks the container of the accessor. | 284 | * @brief Unlocks the container of the accessor. |
@@ -293,7 +293,7 @@ EAPI Eina_Accessor* eina_accessor_clone(Eina_Accessor *accessor) EINA_ARG_NONNUL | |||
293 | * | 293 | * |
294 | * @warning None of the existing eina data structures are lockable. | 294 | * @warning None of the existing eina data structures are lockable. |
295 | */ | 295 | */ |
296 | EAPI Eina_Bool eina_accessor_unlock(Eina_Accessor *accessor) EINA_ARG_NONNULL(1); | 296 | EINA_API Eina_Bool eina_accessor_unlock(Eina_Accessor *accessor) EINA_ARG_NONNULL(1); |
297 | 297 | ||
298 | /** | 298 | /** |
299 | * @def EINA_ACCESSOR_FOREACH | 299 | * @def EINA_ACCESSOR_FOREACH |
@@ -363,7 +363,7 @@ EAPI Eina_Bool eina_accessor_unlock(Eina_Accessor *accessor) EINA_ARG_NONNULL(1) | |||
363 | * | 363 | * |
364 | * @since 1.23 | 364 | * @since 1.23 |
365 | */ | 365 | */ |
366 | EAPI Eina_Accessor* eina_carray_length_accessor_new(void** array, unsigned int step, unsigned int length); | 366 | EINA_API Eina_Accessor* eina_carray_length_accessor_new(void** array, unsigned int step, unsigned int length); |
367 | 367 | ||
368 | 368 | ||
369 | /** | 369 | /** |
@@ -383,7 +383,7 @@ EAPI Eina_Accessor* eina_carray_length_accessor_new(void** array, unsigned int s | |||
383 | 383 | ||
384 | * @since 1.24 | 384 | * @since 1.24 |
385 | */ | 385 | */ |
386 | EAPI Eina_Accessor* eina_carray_length_ptr_accessor_new(void** array, unsigned int step, unsigned int length); | 386 | EINA_API Eina_Accessor* eina_carray_length_ptr_accessor_new(void** array, unsigned int step, unsigned int length); |
387 | /** | 387 | /** |
388 | * @def EINA_C_ARRAY_ACCESSOR_NEW | 388 | * @def EINA_C_ARRAY_ACCESSOR_NEW |
389 | * @brief Creates an Eina_Accessor that wraps a plain fixed size C array | 389 | * @brief Creates an Eina_Accessor that wraps a plain fixed size C array |
diff --git a/src/lib/eina/eina_array.c b/src/lib/eina/eina_array.c index cda5181213..a7c50d28dd 100644 --- a/src/lib/eina/eina_array.c +++ b/src/lib/eina/eina_array.c | |||
@@ -191,7 +191,7 @@ eina_array_accessor_clone(const Eina_Accessor_Array *it) | |||
191 | } | 191 | } |
192 | 192 | ||
193 | /* used from eina_inline_array.x, thus a needed symbol */ | 193 | /* used from eina_inline_array.x, thus a needed symbol */ |
194 | EAPI Eina_Bool | 194 | EINA_API Eina_Bool |
195 | eina_array_grow(Eina_Array *array) | 195 | eina_array_grow(Eina_Array *array) |
196 | { | 196 | { |
197 | void **tmp; | 197 | void **tmp; |
@@ -272,7 +272,7 @@ eina_array_shutdown(void) | |||
272 | * API * | 272 | * API * |
273 | *============================================================================*/ | 273 | *============================================================================*/ |
274 | 274 | ||
275 | EAPI Eina_Array * | 275 | EINA_API Eina_Array * |
276 | eina_array_new(unsigned int step) | 276 | eina_array_new(unsigned int step) |
277 | { | 277 | { |
278 | Eina_Array *array; | 278 | Eina_Array *array; |
@@ -291,7 +291,7 @@ eina_array_new(unsigned int step) | |||
291 | return array; | 291 | return array; |
292 | } | 292 | } |
293 | 293 | ||
294 | EAPI void | 294 | EINA_API void |
295 | eina_array_free(Eina_Array *array) | 295 | eina_array_free(Eina_Array *array) |
296 | { | 296 | { |
297 | if (!array) return; | 297 | if (!array) return; |
@@ -301,7 +301,7 @@ eina_array_free(Eina_Array *array) | |||
301 | MAGIC_FREE(array); | 301 | MAGIC_FREE(array); |
302 | } | 302 | } |
303 | 303 | ||
304 | EAPI void | 304 | EINA_API void |
305 | eina_array_step_set(Eina_Array *array, | 305 | eina_array_step_set(Eina_Array *array, |
306 | unsigned int sizeof_eina_array, | 306 | unsigned int sizeof_eina_array, |
307 | unsigned int step) | 307 | unsigned int step) |
@@ -326,7 +326,7 @@ eina_array_step_set(Eina_Array *array, | |||
326 | EINA_MAGIC_SET(array, EINA_MAGIC_ARRAY); | 326 | EINA_MAGIC_SET(array, EINA_MAGIC_ARRAY); |
327 | } | 327 | } |
328 | 328 | ||
329 | EAPI void | 329 | EINA_API void |
330 | eina_array_flush(Eina_Array *array) | 330 | eina_array_flush(Eina_Array *array) |
331 | { | 331 | { |
332 | EINA_SAFETY_ON_NULL_RETURN(array); | 332 | EINA_SAFETY_ON_NULL_RETURN(array); |
@@ -342,7 +342,7 @@ eina_array_flush(Eina_Array *array) | |||
342 | array->data = NULL; | 342 | array->data = NULL; |
343 | } | 343 | } |
344 | 344 | ||
345 | EAPI Eina_Bool | 345 | EINA_API Eina_Bool |
346 | eina_array_remove(Eina_Array *array, Eina_Bool (*keep)(void *data, | 346 | eina_array_remove(Eina_Array *array, Eina_Bool (*keep)(void *data, |
347 | void *gdata), | 347 | void *gdata), |
348 | void *gdata) | 348 | void *gdata) |
@@ -390,7 +390,7 @@ eina_array_remove(Eina_Array *array, Eina_Bool (*keep)(void *data, | |||
390 | return EINA_TRUE; | 390 | return EINA_TRUE; |
391 | } | 391 | } |
392 | 392 | ||
393 | EAPI Eina_Iterator * | 393 | EINA_API Eina_Iterator * |
394 | eina_array_iterator_new(const Eina_Array *array) | 394 | eina_array_iterator_new(const Eina_Array *array) |
395 | { | 395 | { |
396 | Eina_Iterator_Array *it; | 396 | Eina_Iterator_Array *it; |
@@ -415,7 +415,7 @@ eina_array_iterator_new(const Eina_Array *array) | |||
415 | return &it->iterator; | 415 | return &it->iterator; |
416 | } | 416 | } |
417 | 417 | ||
418 | EAPI Eina_Accessor * | 418 | EINA_API Eina_Accessor * |
419 | eina_array_accessor_new(const Eina_Array *array) | 419 | eina_array_accessor_new(const Eina_Array *array) |
420 | { | 420 | { |
421 | Eina_Accessor_Array *ac; | 421 | Eina_Accessor_Array *ac; |
diff --git a/src/lib/eina/eina_array.h b/src/lib/eina/eina_array.h index c6e62ad142..3c4eb6f753 100644 --- a/src/lib/eina/eina_array.h +++ b/src/lib/eina/eina_array.h | |||
@@ -251,7 +251,7 @@ struct _Eina_Array | |||
251 | * This function return a valid array on success, or @c NULL if memory | 251 | * This function return a valid array on success, or @c NULL if memory |
252 | * allocation fails. | 252 | * allocation fails. |
253 | */ | 253 | */ |
254 | EAPI Eina_Array *eina_array_new(unsigned int step) EINA_WARN_UNUSED_RESULT EINA_MALLOC EINA_WARN_UNUSED_RESULT; | 254 | EINA_API Eina_Array *eina_array_new(unsigned int step) EINA_WARN_UNUSED_RESULT EINA_MALLOC EINA_WARN_UNUSED_RESULT; |
255 | 255 | ||
256 | /** | 256 | /** |
257 | * @brief Frees an array. | 257 | * @brief Frees an array. |
@@ -263,7 +263,7 @@ EAPI Eina_Array *eina_array_new(unsigned int step) EINA_WARN_UNUSED_RESULT EINA_ | |||
263 | * does not free the memory allocated for the elements of @p array. To | 263 | * does not free the memory allocated for the elements of @p array. To |
264 | * free them, walk the array with #EINA_ARRAY_ITER_NEXT. | 264 | * free them, walk the array with #EINA_ARRAY_ITER_NEXT. |
265 | */ | 265 | */ |
266 | EAPI void eina_array_free(Eina_Array *array); | 266 | EINA_API void eina_array_free(Eina_Array *array); |
267 | 267 | ||
268 | /** | 268 | /** |
269 | * @brief Sets the step of an array. | 269 | * @brief Sets the step of an array. |
@@ -278,7 +278,7 @@ EAPI void eina_array_free(Eina_Array *array); | |||
278 | * | 278 | * |
279 | * @warning This function can @b only be called on uninitialized arrays. | 279 | * @warning This function can @b only be called on uninitialized arrays. |
280 | */ | 280 | */ |
281 | EAPI void eina_array_step_set(Eina_Array *array, | 281 | EINA_API void eina_array_step_set(Eina_Array *array, |
282 | unsigned int sizeof_eina_array, | 282 | unsigned int sizeof_eina_array, |
283 | unsigned int step) EINA_ARG_NONNULL(1); | 283 | unsigned int step) EINA_ARG_NONNULL(1); |
284 | /** | 284 | /** |
@@ -303,7 +303,7 @@ static inline void eina_array_clean(Eina_Array *array) EINA_ARG_NONNULL(1); | |||
303 | * there is no check of @p array. If it is @c NULL or invalid, the | 303 | * there is no check of @p array. If it is @c NULL or invalid, the |
304 | * program may crash. | 304 | * program may crash. |
305 | */ | 305 | */ |
306 | EAPI void eina_array_flush(Eina_Array *array) EINA_ARG_NONNULL(1); | 306 | EINA_API void eina_array_flush(Eina_Array *array) EINA_ARG_NONNULL(1); |
307 | 307 | ||
308 | /** | 308 | /** |
309 | * @brief Rebuilds an array by specifying the data to keep. | 309 | * @brief Rebuilds an array by specifying the data to keep. |
@@ -321,7 +321,7 @@ EAPI void eina_array_flush(Eina_Array *array) EINA_ARG_NONNULL(1); | |||
321 | * If it wasn't able to remove items due to an allocation failure, it will | 321 | * If it wasn't able to remove items due to an allocation failure, it will |
322 | * return #EINA_FALSE. | 322 | * return #EINA_FALSE. |
323 | */ | 323 | */ |
324 | EAPI Eina_Bool eina_array_remove(Eina_Array * array, | 324 | EINA_API Eina_Bool eina_array_remove(Eina_Array * array, |
325 | Eina_Bool (*keep)(void *data, void *gdata), | 325 | Eina_Bool (*keep)(void *data, void *gdata), |
326 | void *gdata) EINA_ARG_NONNULL(1, 2); | 326 | void *gdata) EINA_ARG_NONNULL(1, 2); |
327 | 327 | ||
@@ -441,7 +441,7 @@ static inline Eina_Bool eina_array_find(const Eina_Array *array, | |||
441 | * | 441 | * |
442 | * @see Eina_Iterator_Group | 442 | * @see Eina_Iterator_Group |
443 | */ | 443 | */ |
444 | EAPI Eina_Iterator *eina_array_iterator_new(const Eina_Array *array) EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; | 444 | EINA_API Eina_Iterator *eina_array_iterator_new(const Eina_Array *array) EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; |
445 | 445 | ||
446 | /** | 446 | /** |
447 | * @brief Gets a new accessor associated with an array. | 447 | * @brief Gets a new accessor associated with an array. |
@@ -456,7 +456,7 @@ EAPI Eina_Iterator *eina_array_iterator_new(const Eina_Array *array) EINA | |||
456 | * | 456 | * |
457 | * @see Eina_Accessor_Group | 457 | * @see Eina_Accessor_Group |
458 | */ | 458 | */ |
459 | EAPI Eina_Accessor *eina_array_accessor_new(const Eina_Array *array) EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; | 459 | EINA_API Eina_Accessor *eina_array_accessor_new(const Eina_Array *array) EINA_MALLOC EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; |
460 | 460 | ||
461 | /** | 461 | /** |
462 | * @brief Iterates over an array using a callback function. | 462 | * @brief Iterates over an array using a callback function. |
diff --git a/src/lib/eina/eina_benchmark.c b/src/lib/eina/eina_benchmark.c index 7afa8e8e56..3b4f07bc46 100644 --- a/src/lib/eina/eina_benchmark.c +++ b/src/lib/eina/eina_benchmark.c | |||
@@ -134,7 +134,7 @@ eina_benchmark_shutdown(void) | |||
134 | * API * | 134 | * API * |
135 | *============================================================================*/ | 135 | *============================================================================*/ |
136 | 136 | ||
137 | EAPI Eina_Benchmark * | 137 | EINA_API Eina_Benchmark * |
138 | eina_benchmark_new(const char *name, const char *run) | 138 | eina_benchmark_new(const char *name, const char *run) |
139 | { | 139 | { |
140 | Eina_Benchmark *new; | 140 | Eina_Benchmark *new; |
@@ -148,7 +148,7 @@ eina_benchmark_new(const char *name, const char *run) | |||
148 | return new; | 148 | return new; |
149 | } | 149 | } |
150 | 150 | ||
151 | EAPI void | 151 | EINA_API void |
152 | eina_benchmark_free(Eina_Benchmark *bench) | 152 | eina_benchmark_free(Eina_Benchmark *bench) |
153 | { | 153 | { |
154 | Eina_Array *names; | 154 | Eina_Array *names; |
@@ -179,7 +179,7 @@ eina_benchmark_free(Eina_Benchmark *bench) | |||
179 | free(bench); | 179 | free(bench); |
180 | } | 180 | } |
181 | 181 | ||
182 | EAPI Eina_Bool | 182 | EINA_API Eina_Bool |
183 | eina_benchmark_register(Eina_Benchmark *bench, | 183 | eina_benchmark_register(Eina_Benchmark *bench, |
184 | const char *name, | 184 | const char *name, |
185 | Eina_Benchmark_Specimens bench_cb, | 185 | Eina_Benchmark_Specimens bench_cb, |
@@ -209,7 +209,7 @@ eina_benchmark_register(Eina_Benchmark *bench, | |||
209 | return EINA_TRUE; | 209 | return EINA_TRUE; |
210 | } | 210 | } |
211 | 211 | ||
212 | EAPI Eina_Array * | 212 | EINA_API Eina_Array * |
213 | eina_benchmark_run(Eina_Benchmark *bench) | 213 | eina_benchmark_run(Eina_Benchmark *bench) |
214 | { | 214 | { |
215 | FILE *main_script; | 215 | FILE *main_script; |
diff --git a/src/lib/eina/eina_benchmark.h b/src/lib/eina/eina_benchmark.h index b772132782..c906abba58 100644 --- a/src/lib/eina/eina_benchmark.h +++ b/src/lib/eina/eina_benchmark.h | |||
@@ -359,7 +359,7 @@ typedef void (*Eina_Benchmark_Specimens)(int request); | |||
359 | * When the new module is not needed anymore, use | 359 | * When the new module is not needed anymore, use |
360 | * eina_benchmark_free() to free the allocated memory. | 360 | * eina_benchmark_free() to free the allocated memory. |
361 | */ | 361 | */ |
362 | EAPI Eina_Benchmark *eina_benchmark_new(const char *name, | 362 | EINA_API Eina_Benchmark *eina_benchmark_new(const char *name, |
363 | const char *run); | 363 | const char *run); |
364 | 364 | ||
365 | /** | 365 | /** |
@@ -371,7 +371,7 @@ EAPI Eina_Benchmark *eina_benchmark_new(const char *name, | |||
371 | * registered and frees @p bench. If @p bench is @c NULL, this | 371 | * registered and frees @p bench. If @p bench is @c NULL, this |
372 | * function returns immediately. | 372 | * function returns immediately. |
373 | */ | 373 | */ |
374 | EAPI void eina_benchmark_free(Eina_Benchmark *bench); | 374 | EINA_API void eina_benchmark_free(Eina_Benchmark *bench); |
375 | 375 | ||
376 | /** | 376 | /** |
377 | * @brief Adds a test to a benchmark. | 377 | * @brief Adds a test to a benchmark. |
@@ -393,7 +393,7 @@ EAPI void eina_benchmark_free(Eina_Benchmark *bench); | |||
393 | * If @p bench is @c NULL or @p count_step is 0, this function returns | 393 | * If @p bench is @c NULL or @p count_step is 0, this function returns |
394 | * immediately and does not add any tests to the benchmark. | 394 | * immediately and does not add any tests to the benchmark. |
395 | */ | 395 | */ |
396 | EAPI Eina_Bool eina_benchmark_register(Eina_Benchmark *bench, | 396 | EINA_API Eina_Bool eina_benchmark_register(Eina_Benchmark *bench, |
397 | const char *name, | 397 | const char *name, |
398 | Eina_Benchmark_Specimens bench_cb, | 398 | Eina_Benchmark_Specimens bench_cb, |
399 | int count_start, | 399 | int count_start, |
@@ -422,7 +422,7 @@ EAPI Eina_Bool eina_benchmark_register(Eina_Benchmark *bench, | |||
422 | * the gnuplot file. The number of times each test is executed is | 422 | * the gnuplot file. The number of times each test is executed is |
423 | * controlled by the parameters passed to eina_benchmark_register(). | 423 | * controlled by the parameters passed to eina_benchmark_register(). |
424 | */ | 424 | */ |
425 | EAPI Eina_Array *eina_benchmark_run(Eina_Benchmark *bench); | 425 | EINA_API Eina_Array *eina_benchmark_run(Eina_Benchmark *bench); |
426 | 426 | ||
427 | /** | 427 | /** |
428 | * @} | 428 | * @} |
diff --git a/src/lib/eina/eina_bezier.c b/src/lib/eina/eina_bezier.c index b3b093c790..43dbe33578 100644 --- a/src/lib/eina/eina_bezier.c +++ b/src/lib/eina/eina_bezier.c | |||
@@ -106,7 +106,7 @@ _eina_bezier_length_helper(const Eina_Bezier *b) | |||
106 | return len; | 106 | return len; |
107 | } | 107 | } |
108 | 108 | ||
109 | EAPI void | 109 | EINA_API void |
110 | eina_bezier_values_set(Eina_Bezier *b, | 110 | eina_bezier_values_set(Eina_Bezier *b, |
111 | double start_x, double start_y, | 111 | double start_x, double start_y, |
112 | double ctrl_start_x, double ctrl_start_y, | 112 | double ctrl_start_x, double ctrl_start_y, |
@@ -123,7 +123,7 @@ eina_bezier_values_set(Eina_Bezier *b, | |||
123 | b->end.y = end_y; | 123 | b->end.y = end_y; |
124 | } | 124 | } |
125 | 125 | ||
126 | EAPI void | 126 | EINA_API void |
127 | eina_bezier_values_get(const Eina_Bezier *b, | 127 | eina_bezier_values_get(const Eina_Bezier *b, |
128 | double *start_x, double *start_y, | 128 | double *start_x, double *start_y, |
129 | double *ctrl_start_x, double *ctrl_start_y, | 129 | double *ctrl_start_x, double *ctrl_start_y, |
@@ -141,7 +141,7 @@ eina_bezier_values_get(const Eina_Bezier *b, | |||
141 | } | 141 | } |
142 | 142 | ||
143 | 143 | ||
144 | EAPI void | 144 | EINA_API void |
145 | eina_bezier_point_at(const Eina_Bezier *bz, double t, double *px, double *py) | 145 | eina_bezier_point_at(const Eina_Bezier *bz, double t, double *px, double *py) |
146 | { | 146 | { |
147 | double m_t = 1.0 - t; | 147 | double m_t = 1.0 - t; |
@@ -169,7 +169,7 @@ eina_bezier_point_at(const Eina_Bezier *bz, double t, double *px, double *py) | |||
169 | } | 169 | } |
170 | } | 170 | } |
171 | 171 | ||
172 | EAPI double | 172 | EINA_API double |
173 | eina_bezier_angle_at(const Eina_Bezier *b, double t) | 173 | eina_bezier_angle_at(const Eina_Bezier *b, double t) |
174 | { | 174 | { |
175 | double x, y; | 175 | double x, y; |
@@ -183,7 +183,7 @@ eina_bezier_angle_at(const Eina_Bezier *b, double t) | |||
183 | return theta_normalized; | 183 | return theta_normalized; |
184 | } | 184 | } |
185 | 185 | ||
186 | EAPI double | 186 | EINA_API double |
187 | eina_bezier_length_get(const Eina_Bezier *b) | 187 | eina_bezier_length_get(const Eina_Bezier *b) |
188 | { | 188 | { |
189 | return _eina_bezier_length_helper(b); | 189 | return _eina_bezier_length_helper(b); |
@@ -218,7 +218,7 @@ _eina_bezier_split_left(Eina_Bezier *b, double t, Eina_Bezier *left) | |||
218 | left->end.y = b->start.y = left->ctrl_end.y + t * (b->ctrl_start.y - left->ctrl_end.y); | 218 | left->end.y = b->start.y = left->ctrl_end.y + t * (b->ctrl_start.y - left->ctrl_end.y); |
219 | } | 219 | } |
220 | 220 | ||
221 | EAPI double | 221 | EINA_API double |
222 | eina_bezier_t_at(const Eina_Bezier *b, double l) | 222 | eina_bezier_t_at(const Eina_Bezier *b, double l) |
223 | { | 223 | { |
224 | double len = eina_bezier_length_get(b); | 224 | double len = eina_bezier_length_get(b); |
@@ -256,7 +256,7 @@ eina_bezier_t_at(const Eina_Bezier *b, double l) | |||
256 | return t; | 256 | return t; |
257 | } | 257 | } |
258 | 258 | ||
259 | EAPI void | 259 | EINA_API void |
260 | eina_bezier_split_at_length(const Eina_Bezier *b, double len, | 260 | eina_bezier_split_at_length(const Eina_Bezier *b, double len, |
261 | Eina_Bezier *left, Eina_Bezier *right) | 261 | Eina_Bezier *left, Eina_Bezier *right) |
262 | { | 262 | { |
@@ -270,7 +270,7 @@ eina_bezier_split_at_length(const Eina_Bezier *b, double len, | |||
270 | _eina_bezier_split_left(right, t, left); | 270 | _eina_bezier_split_left(right, t, left); |
271 | } | 271 | } |
272 | 272 | ||
273 | EAPI void | 273 | EINA_API void |
274 | eina_bezier_bounds_get(const Eina_Bezier *b, double *x, double *y, double *w, double *h) | 274 | eina_bezier_bounds_get(const Eina_Bezier *b, double *x, double *y, double *w, double *h) |
275 | { | 275 | { |
276 | double xmin = b->start.x; | 276 | double xmin = b->start.x; |
@@ -310,7 +310,7 @@ eina_bezier_bounds_get(const Eina_Bezier *b, double *x, double *y, double *w, do | |||
310 | if (h) *h = ymax - ymin; | 310 | if (h) *h = ymax - ymin; |
311 | } | 311 | } |
312 | 312 | ||
313 | EAPI void | 313 | EINA_API void |
314 | eina_bezier_on_interval(Eina_Bezier *b, double t0, double t1, Eina_Bezier *result) | 314 | eina_bezier_on_interval(Eina_Bezier *b, double t0, double t1, Eina_Bezier *result) |
315 | { | 315 | { |
316 | Eina_Bezier bezier; | 316 | Eina_Bezier bezier; |
diff --git a/src/lib/eina/eina_bezier.h b/src/lib/eina/eina_bezier.h index 2c886fa681..1779da09fc 100644 --- a/src/lib/eina/eina_bezier.h +++ b/src/lib/eina/eina_bezier.h | |||
@@ -71,7 +71,7 @@ struct _Eina_Bezier | |||
71 | * @p b. No check is done on @p b. | 71 | * @p b. No check is done on @p b. |
72 | * @since 1.16 | 72 | * @since 1.16 |
73 | */ | 73 | */ |
74 | EAPI void eina_bezier_values_set(Eina_Bezier *b, double start_x, double start_y, double ctrl_start_x, double ctrl_start_y, double ctrl_end_x, double ctrl_end_y, double end_x, double end_y) EINA_ARG_NONNULL(1); | 74 | EINA_API void eina_bezier_values_set(Eina_Bezier *b, double start_x, double start_y, double ctrl_start_x, double ctrl_start_y, double ctrl_end_x, double ctrl_end_y, double end_x, double end_y) EINA_ARG_NONNULL(1); |
75 | 75 | ||
76 | /** | 76 | /** |
77 | * @brief Gets the values of the points of the given floating | 77 | * @brief Gets the values of the points of the given floating |
@@ -90,7 +90,7 @@ EAPI void eina_bezier_values_set(Eina_Bezier *b, double start_x, double start_y, | |||
90 | * @p b. No check is done on @p b. | 90 | * @p b. No check is done on @p b. |
91 | * @since 1.16 | 91 | * @since 1.16 |
92 | */ | 92 | */ |
93 | EAPI void eina_bezier_values_get(const Eina_Bezier *b, double *start_x, double *start_y, double *ctrl_start_x, double *ctrl_start_y, double *ctrl_end_x, double *ctrl_end_y, double *end_x, double *end_y) EINA_ARG_NONNULL(1); | 93 | EINA_API void eina_bezier_values_get(const Eina_Bezier *b, double *start_x, double *start_y, double *ctrl_start_x, double *ctrl_start_y, double *ctrl_end_x, double *ctrl_end_y, double *end_x, double *end_y) EINA_ARG_NONNULL(1); |
94 | 94 | ||
95 | /** | 95 | /** |
96 | * @brief Calculates the approximate length of the given floating point | 96 | * @brief Calculates the approximate length of the given floating point |
@@ -106,7 +106,7 @@ EAPI void eina_bezier_values_get(const Eina_Bezier *b, double *start_x, double * | |||
106 | * No check is done on @p b. | 106 | * No check is done on @p b. |
107 | * @since 1.16 | 107 | * @since 1.16 |
108 | */ | 108 | */ |
109 | EAPI double eina_bezier_length_get(const Eina_Bezier *b) EINA_ARG_NONNULL(1); | 109 | EINA_API double eina_bezier_length_get(const Eina_Bezier *b) EINA_ARG_NONNULL(1); |
110 | 110 | ||
111 | /** | 111 | /** |
112 | * @brief Returns the relative position on a bezier at a given length. | 112 | * @brief Returns the relative position on a bezier at a given length. |
@@ -123,7 +123,7 @@ EAPI double eina_bezier_length_get(const Eina_Bezier *b) EINA_ARG_NONNULL(1); | |||
123 | * | 123 | * |
124 | * @since 1.16 | 124 | * @since 1.16 |
125 | */ | 125 | */ |
126 | EAPI double eina_bezier_t_at(const Eina_Bezier *b, double len) EINA_ARG_NONNULL(1); | 126 | EINA_API double eina_bezier_t_at(const Eina_Bezier *b, double len) EINA_ARG_NONNULL(1); |
127 | 127 | ||
128 | /** | 128 | /** |
129 | * @brief Gets the point on the bezier curve at position t. | 129 | * @brief Gets the point on the bezier curve at position t. |
@@ -136,7 +136,7 @@ EAPI double eina_bezier_t_at(const Eina_Bezier *b, double len) EINA_ARG_NONNULL( | |||
136 | * No check is done on @p b. | 136 | * No check is done on @p b. |
137 | * @since 1.16 | 137 | * @since 1.16 |
138 | */ | 138 | */ |
139 | EAPI void eina_bezier_point_at(const Eina_Bezier *b, double t, double *px, double *py) EINA_ARG_NONNULL(1); | 139 | EINA_API void eina_bezier_point_at(const Eina_Bezier *b, double t, double *px, double *py) EINA_ARG_NONNULL(1); |
140 | 140 | ||
141 | /** | 141 | /** |
142 | * @brief Determines the slope of the bezier at a given position. | 142 | * @brief Determines the slope of the bezier at a given position. |
@@ -147,7 +147,7 @@ EAPI void eina_bezier_point_at(const Eina_Bezier *b, double t, double *px, doubl | |||
147 | * No check is done on @p b. | 147 | * No check is done on @p b. |
148 | * @since 1.16 | 148 | * @since 1.16 |
149 | */ | 149 | */ |
150 | EAPI double eina_bezier_angle_at(const Eina_Bezier *b, double t) EINA_ARG_NONNULL(1); | 150 | EINA_API double eina_bezier_angle_at(const Eina_Bezier *b, double t) EINA_ARG_NONNULL(1); |
151 | 151 | ||
152 | /** | 152 | /** |
153 | * @brief Splits the bezier at a given length. | 153 | * @brief Splits the bezier at a given length. |
@@ -160,7 +160,7 @@ EAPI double eina_bezier_angle_at(const Eina_Bezier *b, double t) EINA_ARG_NONNUL | |||
160 | * No check is done on @p b. | 160 | * No check is done on @p b. |
161 | * @since 1.16 | 161 | * @since 1.16 |
162 | */ | 162 | */ |
163 | EAPI void eina_bezier_split_at_length(const Eina_Bezier *b, double len, Eina_Bezier *left, Eina_Bezier *right) EINA_ARG_NONNULL(1); | 163 | EINA_API void eina_bezier_split_at_length(const Eina_Bezier *b, double len, Eina_Bezier *left, Eina_Bezier *right) EINA_ARG_NONNULL(1); |
164 | 164 | ||
165 | /** | 165 | /** |
166 | * @brief Calculates the bounding box for the bezier. | 166 | * @brief Calculates the bounding box for the bezier. |
@@ -174,7 +174,7 @@ EAPI void eina_bezier_split_at_length(const Eina_Bezier *b, double len, Eina_Bez | |||
174 | * No check is done on @p b. | 174 | * No check is done on @p b. |
175 | * @since 1.17 | 175 | * @since 1.17 |
176 | */ | 176 | */ |
177 | EAPI void eina_bezier_bounds_get(const Eina_Bezier *b, double *x, double *y, double *w, double *h) EINA_ARG_NONNULL(1); | 177 | EINA_API void eina_bezier_bounds_get(const Eina_Bezier *b, double *x, double *y, double *w, double *h) EINA_ARG_NONNULL(1); |
178 | 178 | ||
179 | /** | 179 | /** |
180 | * @brief Finds the bezier between the given interval. | 180 | * @brief Finds the bezier between the given interval. |
@@ -187,7 +187,7 @@ EAPI void eina_bezier_bounds_get(const Eina_Bezier *b, double *x, double *y, dou | |||
187 | * No check is done on @p b. | 187 | * No check is done on @p b. |
188 | * @since 1.17 | 188 | * @since 1.17 |
189 | */ | 189 | */ |
190 | EAPI void eina_bezier_on_interval(Eina_Bezier *b, double t0, double t1, Eina_Bezier *result); | 190 | EINA_API void eina_bezier_on_interval(Eina_Bezier *b, double t0, double t1, Eina_Bezier *result); |
191 | 191 | ||
192 | /** | 192 | /** |
193 | * @} | 193 | * @} |
diff --git a/src/lib/eina/eina_binbuf.c b/src/lib/eina/eina_binbuf.c index d392686c33..9e7e5de337 100644 --- a/src/lib/eina/eina_binbuf.c +++ b/src/lib/eina/eina_binbuf.c | |||
@@ -53,7 +53,7 @@ static const char __BINBUF_MAGIC_STR[] = "Eina Binbuf"; | |||
53 | 53 | ||
54 | #include "eina_binbuf_template_c.x" | 54 | #include "eina_binbuf_template_c.x" |
55 | 55 | ||
56 | EAPI Eina_Binbuf * | 56 | EINA_API Eina_Binbuf * |
57 | eina_binbuf_manage_new(const unsigned char *str, size_t length, Eina_Bool ro) | 57 | eina_binbuf_manage_new(const unsigned char *str, size_t length, Eina_Bool ro) |
58 | { | 58 | { |
59 | Eina_Binbuf *buf; | 59 | Eina_Binbuf *buf; |
diff --git a/src/lib/eina/eina_binbuf.h b/src/lib/eina/eina_binbuf.h index dbbcf9e31a..99cda39f15 100644 --- a/src/lib/eina/eina_binbuf.h +++ b/src/lib/eina/eina_binbuf.h | |||
@@ -47,7 +47,7 @@ typedef struct _Eina_Strbuf Eina_Binbuf; | |||
47 | * @see eina_binbuf_append() | 47 | * @see eina_binbuf_append() |
48 | * @see eina_binbuf_string_get() | 48 | * @see eina_binbuf_string_get() |
49 | */ | 49 | */ |
50 | EAPI Eina_Binbuf *eina_binbuf_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT; | 50 | EINA_API Eina_Binbuf *eina_binbuf_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT; |
51 | 51 | ||
52 | /** | 52 | /** |
53 | * @brief Creates a new string buffer using the passed string. | 53 | * @brief Creates a new string buffer using the passed string. |
@@ -73,7 +73,7 @@ EAPI Eina_Binbuf *eina_binbuf_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT; | |||
73 | * | 73 | * |
74 | * @since 1.14.0 | 74 | * @since 1.14.0 |
75 | */ | 75 | */ |
76 | EAPI Eina_Binbuf *eina_binbuf_manage_new(const unsigned char *str, size_t length, Eina_Bool ro) EINA_MALLOC EINA_WARN_UNUSED_RESULT; | 76 | EINA_API Eina_Binbuf *eina_binbuf_manage_new(const unsigned char *str, size_t length, Eina_Bool ro) EINA_MALLOC EINA_WARN_UNUSED_RESULT; |
77 | 77 | ||
78 | /** | 78 | /** |
79 | * @brief Creates a new string buffer using the passed string. | 79 | * @brief Creates a new string buffer using the passed string. |
@@ -89,7 +89,7 @@ EAPI Eina_Binbuf *eina_binbuf_manage_new(const unsigned char *str, size_t length | |||
89 | * | 89 | * |
90 | * @since 1.2.0 | 90 | * @since 1.2.0 |
91 | */ | 91 | */ |
92 | EAPI Eina_Binbuf *eina_binbuf_manage_new_length(unsigned char *str, size_t length) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_DEPRECATED; | 92 | EINA_API Eina_Binbuf *eina_binbuf_manage_new_length(unsigned char *str, size_t length) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_DEPRECATED; |
93 | 93 | ||
94 | /** | 94 | /** |
95 | * @brief Creates a new string buffer using the passed string. | 95 | * @brief Creates a new string buffer using the passed string. |
@@ -110,7 +110,7 @@ EAPI Eina_Binbuf *eina_binbuf_manage_new_length(unsigned char *str, size_t lengt | |||
110 | * | 110 | * |
111 | * @since 1.9.0 | 111 | * @since 1.9.0 |
112 | */ | 112 | */ |
113 | EAPI Eina_Binbuf *eina_binbuf_manage_read_only_new_length(const unsigned char *str, size_t length) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_DEPRECATED; | 113 | EINA_API Eina_Binbuf *eina_binbuf_manage_read_only_new_length(const unsigned char *str, size_t length) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_DEPRECATED; |
114 | 114 | ||
115 | /** | 115 | /** |
116 | * @brief Frees a string buffer. | 116 | * @brief Frees a string buffer. |
@@ -120,7 +120,7 @@ EAPI Eina_Binbuf *eina_binbuf_manage_read_only_new_length(const unsigned char *s | |||
120 | * This function frees the memory of @p buf. @p buf must have been | 120 | * This function frees the memory of @p buf. @p buf must have been |
121 | * created by eina_binbuf_new(). | 121 | * created by eina_binbuf_new(). |
122 | */ | 122 | */ |
123 | EAPI void eina_binbuf_free(Eina_Binbuf *buf) EINA_ARG_NONNULL(1); | 123 | EINA_API void eina_binbuf_free(Eina_Binbuf *buf) EINA_ARG_NONNULL(1); |
124 | 124 | ||
125 | /** | 125 | /** |
126 | * @brief Resets a string buffer. | 126 | * @brief Resets a string buffer. |
@@ -130,7 +130,7 @@ EAPI void eina_binbuf_free(Eina_Binbuf *buf) EINA_ARG_NONNULL(1); | |||
130 | * This function resets @p buf: the buffer len is set to 0, and the | 130 | * This function resets @p buf: the buffer len is set to 0, and the |
131 | * string is set to '\\0'. No memory is freed. | 131 | * string is set to '\\0'. No memory is freed. |
132 | */ | 132 | */ |
133 | EAPI void eina_binbuf_reset(Eina_Binbuf *buf) EINA_ARG_NONNULL(1); | 133 | EINA_API void eina_binbuf_reset(Eina_Binbuf *buf) EINA_ARG_NONNULL(1); |
134 | 134 | ||
135 | /** | 135 | /** |
136 | * @brief Expands a buffer, making room for at least @p minimum_unused_space. | 136 | * @brief Expands a buffer, making room for at least @p minimum_unused_space. |
@@ -160,7 +160,7 @@ EAPI void eina_binbuf_reset(Eina_Binbuf *buf) EINA_ARG_NONNULL(1); | |||
160 | * | 160 | * |
161 | * @since 1.19 | 161 | * @since 1.19 |
162 | */ | 162 | */ |
163 | EAPI Eina_Rw_Slice eina_binbuf_expand(Eina_Binbuf *buf, size_t minimum_unused_space) EINA_ARG_NONNULL(1); | 163 | EINA_API Eina_Rw_Slice eina_binbuf_expand(Eina_Binbuf *buf, size_t minimum_unused_space) EINA_ARG_NONNULL(1); |
164 | 164 | ||
165 | /** | 165 | /** |
166 | * @brief Marks more bytes as used. | 166 | * @brief Marks more bytes as used. |
@@ -180,7 +180,7 @@ EAPI Eina_Rw_Slice eina_binbuf_expand(Eina_Binbuf *buf, size_t minimum_unused_sp | |||
180 | * | 180 | * |
181 | * @since 1.19 | 181 | * @since 1.19 |
182 | */ | 182 | */ |
183 | EAPI Eina_Bool eina_binbuf_use(Eina_Binbuf *buf, size_t extra_bytes) EINA_ARG_NONNULL(1); | 183 | EINA_API Eina_Bool eina_binbuf_use(Eina_Binbuf *buf, size_t extra_bytes) EINA_ARG_NONNULL(1); |
184 | 184 | ||
185 | /** | 185 | /** |
186 | * @brief Appends a string of exact length to a buffer, reallocating as | 186 | * @brief Appends a string of exact length to a buffer, reallocating as |
@@ -200,7 +200,7 @@ EAPI Eina_Bool eina_binbuf_use(Eina_Binbuf *buf, size_t extra_bytes) EINA_ARG_NO | |||
200 | * @see eina_binbuf_append() | 200 | * @see eina_binbuf_append() |
201 | * @see eina_binbuf_append_n() | 201 | * @see eina_binbuf_append_n() |
202 | */ | 202 | */ |
203 | EAPI Eina_Bool eina_binbuf_append_length(Eina_Binbuf *buf, const unsigned char *str, size_t length) EINA_ARG_NONNULL(1, 2); | 203 | EINA_API Eina_Bool eina_binbuf_append_length(Eina_Binbuf *buf, const unsigned char *str, size_t length) EINA_ARG_NONNULL(1, 2); |
204 | 204 | ||
205 | /** | 205 | /** |
206 | * @brief Appends a slice to a buffer, reallocating as necessary. | 206 | * @brief Appends a slice to a buffer, reallocating as necessary. |
@@ -213,7 +213,7 @@ EAPI Eina_Bool eina_binbuf_append_length(Eina_Binbuf *buf, const unsigned char * | |||
213 | * | 213 | * |
214 | * @since 1.19 | 214 | * @since 1.19 |
215 | */ | 215 | */ |
216 | EAPI Eina_Bool eina_binbuf_append_slice(Eina_Binbuf *buf, const Eina_Slice slice) EINA_ARG_NONNULL(1); | 216 | EINA_API Eina_Bool eina_binbuf_append_slice(Eina_Binbuf *buf, const Eina_Slice slice) EINA_ARG_NONNULL(1); |
217 | 217 | ||
218 | /** | 218 | /** |
219 | * @brief Appends an Eina_Binbuf to a buffer, reallocating as necessary. | 219 | * @brief Appends an Eina_Binbuf to a buffer, reallocating as necessary. |
@@ -232,7 +232,7 @@ EAPI Eina_Bool eina_binbuf_append_slice(Eina_Binbuf *buf, const Eina_Slice slice | |||
232 | * | 232 | * |
233 | * @since 1.9.0 | 233 | * @since 1.9.0 |
234 | */ | 234 | */ |
235 | EAPI Eina_Bool eina_binbuf_append_buffer(Eina_Binbuf *buf, const Eina_Binbuf *data) EINA_ARG_NONNULL(1, 2); | 235 | EINA_API Eina_Bool eina_binbuf_append_buffer(Eina_Binbuf *buf, const Eina_Binbuf *data) EINA_ARG_NONNULL(1, 2); |
236 | 236 | ||
237 | /** | 237 | /** |
238 | * @brief Appends a character to a string buffer, reallocating as | 238 | * @brief Appends a character to a string buffer, reallocating as |
@@ -244,7 +244,7 @@ EAPI Eina_Bool eina_binbuf_append_buffer(Eina_Binbuf *buf, const Eina_Binbuf *da | |||
244 | * | 244 | * |
245 | * This function appends @p c to @p buf. | 245 | * This function appends @p c to @p buf. |
246 | */ | 246 | */ |
247 | EAPI Eina_Bool eina_binbuf_append_char(Eina_Binbuf *buf, unsigned char c) EINA_ARG_NONNULL(1); | 247 | EINA_API Eina_Bool eina_binbuf_append_char(Eina_Binbuf *buf, unsigned char c) EINA_ARG_NONNULL(1); |
248 | 248 | ||
249 | /** | 249 | /** |
250 | * @brief Inserts a string of exact length into a buffer, reallocating as necessary. | 250 | * @brief Inserts a string of exact length into a buffer, reallocating as necessary. |
@@ -264,7 +264,7 @@ EAPI Eina_Bool eina_binbuf_append_char(Eina_Binbuf *buf, unsigned char c) EINA_A | |||
264 | * @see eina_binbuf_insert() | 264 | * @see eina_binbuf_insert() |
265 | * @see eina_binbuf_insert_n() | 265 | * @see eina_binbuf_insert_n() |
266 | */ | 266 | */ |
267 | EAPI Eina_Bool eina_binbuf_insert_length(Eina_Binbuf *buf, const unsigned char *str, size_t length, size_t pos) EINA_ARG_NONNULL(1, 2); | 267 | EINA_API Eina_Bool eina_binbuf_insert_length(Eina_Binbuf *buf, const unsigned char *str, size_t length, size_t pos) EINA_ARG_NONNULL(1, 2); |
268 | 268 | ||
269 | /** | 269 | /** |
270 | * @brief Inserts a slice into a buffer, reallocating as necessary. | 270 | * @brief Inserts a slice into a buffer, reallocating as necessary. |
@@ -278,7 +278,7 @@ EAPI Eina_Bool eina_binbuf_insert_length(Eina_Binbuf *buf, const unsigned char * | |||
278 | * | 278 | * |
279 | * @since 1.19.0 | 279 | * @since 1.19.0 |
280 | */ | 280 | */ |
281 | EAPI Eina_Bool eina_binbuf_insert_slice(Eina_Binbuf *buf, const Eina_Slice slice, size_t pos) EINA_ARG_NONNULL(1); | 281 | EINA_API Eina_Bool eina_binbuf_insert_slice(Eina_Binbuf *buf, const Eina_Slice slice, size_t pos) EINA_ARG_NONNULL(1); |
282 | 282 | ||
283 | /** | 283 | /** |
284 | * @brief Inserts a character into a string buffer, reallocating as | 284 | * @brief Inserts a character into a string buffer, reallocating as |
@@ -291,7 +291,7 @@ EAPI Eina_Bool eina_binbuf_insert_slice(Eina_Binbuf *buf, const Eina_Slice slice | |||
291 | * | 291 | * |
292 | * This function inserts @p c to @p buf at position @p pos. | 292 | * This function inserts @p c to @p buf at position @p pos. |
293 | */ | 293 | */ |
294 | EAPI Eina_Bool eina_binbuf_insert_char(Eina_Binbuf *buf, unsigned char c, size_t pos) EINA_ARG_NONNULL(1); | 294 | EINA_API Eina_Bool eina_binbuf_insert_char(Eina_Binbuf *buf, unsigned char c, size_t pos) EINA_ARG_NONNULL(1); |
295 | 295 | ||
296 | /** | 296 | /** |
297 | * @brief Removes a slice of the given string buffer. | 297 | * @brief Removes a slice of the given string buffer. |
@@ -307,7 +307,7 @@ EAPI Eina_Bool eina_binbuf_insert_char(Eina_Binbuf *buf, unsigned char c, size_t | |||
307 | * (inclusive) and ending at @p end (non-inclusive). Both values are | 307 | * (inclusive) and ending at @p end (non-inclusive). Both values are |
308 | * in bytes. | 308 | * in bytes. |
309 | */ | 309 | */ |
310 | EAPI Eina_Bool eina_binbuf_remove(Eina_Binbuf *buf, size_t start, size_t end) EINA_ARG_NONNULL(1); | 310 | EINA_API Eina_Bool eina_binbuf_remove(Eina_Binbuf *buf, size_t start, size_t end) EINA_ARG_NONNULL(1); |
311 | 311 | ||
312 | /** | 312 | /** |
313 | * @brief Retrieves a pointer to the contents of a string buffer. | 313 | * @brief Retrieves a pointer to the contents of a string buffer. |
@@ -322,7 +322,7 @@ EAPI Eina_Bool eina_binbuf_remove(Eina_Binbuf *buf, size_t start, size_t end) EI | |||
322 | * | 322 | * |
323 | * @see eina_binbuf_string_steal() | 323 | * @see eina_binbuf_string_steal() |
324 | */ | 324 | */ |
325 | EAPI const unsigned char *eina_binbuf_string_get(const Eina_Binbuf *buf) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; | 325 | EINA_API const unsigned char *eina_binbuf_string_get(const Eina_Binbuf *buf) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; |
326 | 326 | ||
327 | /** | 327 | /** |
328 | * @brief Steals the contents of a string buffer. | 328 | * @brief Steals the contents of a string buffer. |
@@ -337,7 +337,7 @@ EAPI const unsigned char *eina_binbuf_string_get(const Eina_Binbuf *buf) EINA_AR | |||
337 | * | 337 | * |
338 | * @see eina_binbuf_string_get() | 338 | * @see eina_binbuf_string_get() |
339 | */ | 339 | */ |
340 | EAPI unsigned char *eina_binbuf_string_steal(Eina_Binbuf *buf) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | 340 | EINA_API unsigned char *eina_binbuf_string_steal(Eina_Binbuf *buf) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); |
341 | 341 | ||
342 | /** | 342 | /** |
343 | * @brief Frees the contents of a string buffer but not the buffer. | 343 | * @brief Frees the contents of a string buffer but not the buffer. |
@@ -347,7 +347,7 @@ EAPI unsigned char *eina_binbuf_string_steal(Eina_Binbuf *buf) EINA_MALLOC EINA_ | |||
347 | * This function frees the string contained in @p buf without freeing | 347 | * This function frees the string contained in @p buf without freeing |
348 | * @p buf. | 348 | * @p buf. |
349 | */ | 349 | */ |
350 | EAPI void eina_binbuf_string_free(Eina_Binbuf *buf) EINA_ARG_NONNULL(1); | 350 | EINA_API void eina_binbuf_string_free(Eina_Binbuf *buf) EINA_ARG_NONNULL(1); |
351 | 351 | ||
352 | /** | 352 | /** |
353 | * @brief Retrieves the length of the string buffer's content. | 353 | * @brief Retrieves the length of the string buffer's content. |
@@ -357,7 +357,7 @@ EAPI void eina_binbuf_string_free(Eina_Binbuf *buf) EINA_ARG_NONNULL(1); | |||
357 | * | 357 | * |
358 | * This function returns the length of @p buf. | 358 | * This function returns the length of @p buf. |
359 | */ | 359 | */ |
360 | EAPI size_t eina_binbuf_length_get(const Eina_Binbuf *buf) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; | 360 | EINA_API size_t eina_binbuf_length_get(const Eina_Binbuf *buf) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; |
361 | 361 | ||
362 | /** | 362 | /** |
363 | * @brief Gets a read-only slice of the buffer contents. | 363 | * @brief Gets a read-only slice of the buffer contents. |
@@ -368,7 +368,7 @@ EAPI size_t eina_binbuf_length_get(const Eina_Binbuf *buf) EINA_ARG_NONNULL(1) E | |||
368 | * | 368 | * |
369 | * @since 1.19 | 369 | * @since 1.19 |
370 | */ | 370 | */ |
371 | EAPI Eina_Slice eina_binbuf_slice_get(const Eina_Binbuf *buf) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | 371 | EINA_API Eina_Slice eina_binbuf_slice_get(const Eina_Binbuf *buf) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); |
372 | 372 | ||
373 | /** | 373 | /** |
374 | * @brief Gets a read-write slice of the buffer contents. | 374 | * @brief Gets a read-write slice of the buffer contents. |
@@ -382,7 +382,7 @@ EAPI Eina_Slice eina_binbuf_slice_get(const Eina_Binbuf *buf) EINA_WARN_UNUSED_R | |||
382 | * | 382 | * |
383 | * @since 1.19 | 383 | * @since 1.19 |
384 | */ | 384 | */ |
385 | EAPI Eina_Rw_Slice eina_binbuf_rw_slice_get(const Eina_Binbuf *buf) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | 385 | EINA_API Eina_Rw_Slice eina_binbuf_rw_slice_get(const Eina_Binbuf *buf) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); |
386 | 386 | ||
387 | /** | 387 | /** |
388 | * @brief Frees the buffer, returning its old contents. | 388 | * @brief Frees the buffer, returning its old contents. |
@@ -393,7 +393,7 @@ EAPI Eina_Rw_Slice eina_binbuf_rw_slice_get(const Eina_Binbuf *buf) EINA_WARN_UN | |||
393 | * | 393 | * |
394 | * @since 1.19 | 394 | * @since 1.19 |
395 | */ | 395 | */ |
396 | EAPI unsigned char* eina_binbuf_release(Eina_Binbuf *buf) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | 396 | EINA_API unsigned char* eina_binbuf_release(Eina_Binbuf *buf) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); |
397 | 397 | ||
398 | /** | 398 | /** |
399 | * @} | 399 | * @} |
diff --git a/src/lib/eina/eina_binbuf_template_c.x b/src/lib/eina/eina_binbuf_template_c.x index ef6a58befd..b693c44f8d 100644 --- a/src/lib/eina/eina_binbuf_template_c.x +++ b/src/lib/eina/eina_binbuf_template_c.x | |||
@@ -57,7 +57,7 @@ _FUNC_EXPAND(shutdown)(void) | |||
57 | * API * | 57 | * API * |
58 | *============================================================================*/ | 58 | *============================================================================*/ |
59 | 59 | ||
60 | EAPI _STRBUF_STRUCT_NAME * | 60 | EINA_API _STRBUF_STRUCT_NAME * |
61 | _FUNC_EXPAND(new)(void) | 61 | _FUNC_EXPAND(new)(void) |
62 | { | 62 | { |
63 | _STRBUF_STRUCT_NAME *buf = eina_strbuf_common_new(_STRBUF_CSIZE); | 63 | _STRBUF_STRUCT_NAME *buf = eina_strbuf_common_new(_STRBUF_CSIZE); |
@@ -65,7 +65,7 @@ _FUNC_EXPAND(new)(void) | |||
65 | return buf; | 65 | return buf; |
66 | } | 66 | } |
67 | 67 | ||
68 | EAPI _STRBUF_STRUCT_NAME * | 68 | EINA_API _STRBUF_STRUCT_NAME * |
69 | _FUNC_EXPAND(manage_new_length)(_STRBUF_DATA_TYPE *str, size_t length) | 69 | _FUNC_EXPAND(manage_new_length)(_STRBUF_DATA_TYPE *str, size_t length) |
70 | { | 70 | { |
71 | _STRBUF_STRUCT_NAME *buf = | 71 | _STRBUF_STRUCT_NAME *buf = |
@@ -74,7 +74,7 @@ _FUNC_EXPAND(manage_new_length)(_STRBUF_DATA_TYPE *str, size_t length) | |||
74 | return buf; | 74 | return buf; |
75 | } | 75 | } |
76 | 76 | ||
77 | EAPI _STRBUF_STRUCT_NAME * | 77 | EINA_API _STRBUF_STRUCT_NAME * |
78 | _FUNC_EXPAND(manage_read_only_new_length)(const _STRBUF_DATA_TYPE *str, size_t length) | 78 | _FUNC_EXPAND(manage_read_only_new_length)(const _STRBUF_DATA_TYPE *str, size_t length) |
79 | { | 79 | { |
80 | _STRBUF_STRUCT_NAME *buf = | 80 | _STRBUF_STRUCT_NAME *buf = |
@@ -83,7 +83,7 @@ _FUNC_EXPAND(manage_read_only_new_length)(const _STRBUF_DATA_TYPE *str, size_t l | |||
83 | return buf; | 83 | return buf; |
84 | } | 84 | } |
85 | 85 | ||
86 | EAPI void | 86 | EINA_API void |
87 | _FUNC_EXPAND(free)(_STRBUF_STRUCT_NAME *buf) | 87 | _FUNC_EXPAND(free)(_STRBUF_STRUCT_NAME *buf) |
88 | { | 88 | { |
89 | if (!buf) return ; | 89 | if (!buf) return ; |
@@ -93,14 +93,14 @@ _FUNC_EXPAND(free)(_STRBUF_STRUCT_NAME *buf) | |||
93 | eina_strbuf_common_free(buf); | 93 | eina_strbuf_common_free(buf); |
94 | } | 94 | } |
95 | 95 | ||
96 | EAPI void | 96 | EINA_API void |
97 | _FUNC_EXPAND(reset)(_STRBUF_STRUCT_NAME *buf) | 97 | _FUNC_EXPAND(reset)(_STRBUF_STRUCT_NAME *buf) |
98 | { | 98 | { |
99 | EINA_MAGIC_CHECK_STRBUF(buf); | 99 | EINA_MAGIC_CHECK_STRBUF(buf); |
100 | eina_strbuf_common_reset(_STRBUF_CSIZE, buf); | 100 | eina_strbuf_common_reset(_STRBUF_CSIZE, buf); |
101 | } | 101 | } |
102 | 102 | ||
103 | EAPI Eina_Rw_Slice | 103 | EINA_API Eina_Rw_Slice |
104 | _FUNC_EXPAND(expand)(_STRBUF_STRUCT_NAME *buf, size_t minimum_unused_space) | 104 | _FUNC_EXPAND(expand)(_STRBUF_STRUCT_NAME *buf, size_t minimum_unused_space) |
105 | { | 105 | { |
106 | Eina_Rw_Slice ret = {.len = 0, .mem = NULL}; | 106 | Eina_Rw_Slice ret = {.len = 0, .mem = NULL}; |
@@ -108,28 +108,28 @@ _FUNC_EXPAND(expand)(_STRBUF_STRUCT_NAME *buf, size_t minimum_unused_space) | |||
108 | return eina_strbuf_common_expand(_STRBUF_CSIZE, buf, minimum_unused_space); | 108 | return eina_strbuf_common_expand(_STRBUF_CSIZE, buf, minimum_unused_space); |
109 | } | 109 | } |
110 | 110 | ||
111 | EAPI Eina_Bool | 111 | EINA_API Eina_Bool |
112 | _FUNC_EXPAND(use)(_STRBUF_STRUCT_NAME *buf, size_t extra_bytes) | 112 | _FUNC_EXPAND(use)(_STRBUF_STRUCT_NAME *buf, size_t extra_bytes) |
113 | { | 113 | { |
114 | EINA_MAGIC_CHECK_STRBUF(buf, EINA_FALSE); | 114 | EINA_MAGIC_CHECK_STRBUF(buf, EINA_FALSE); |
115 | return eina_strbuf_common_use(buf, extra_bytes); | 115 | return eina_strbuf_common_use(buf, extra_bytes); |
116 | } | 116 | } |
117 | 117 | ||
118 | EAPI Eina_Bool | 118 | EINA_API Eina_Bool |
119 | _FUNC_EXPAND(append_length)(_STRBUF_STRUCT_NAME *buf, const _STRBUF_DATA_TYPE *str, size_t length) | 119 | _FUNC_EXPAND(append_length)(_STRBUF_STRUCT_NAME *buf, const _STRBUF_DATA_TYPE *str, size_t length) |
120 | { | 120 | { |
121 | EINA_MAGIC_CHECK_STRBUF(buf, EINA_FALSE); | 121 | EINA_MAGIC_CHECK_STRBUF(buf, EINA_FALSE); |
122 | return eina_strbuf_common_append_length(_STRBUF_CSIZE, buf, (const void *) str, length); | 122 | return eina_strbuf_common_append_length(_STRBUF_CSIZE, buf, (const void *) str, length); |
123 | } | 123 | } |
124 | 124 | ||
125 | EAPI Eina_Bool | 125 | EINA_API Eina_Bool |
126 | _FUNC_EXPAND(append_slice)(_STRBUF_STRUCT_NAME *buf, const Eina_Slice slice) | 126 | _FUNC_EXPAND(append_slice)(_STRBUF_STRUCT_NAME *buf, const Eina_Slice slice) |
127 | { | 127 | { |
128 | EINA_MAGIC_CHECK_STRBUF(buf, EINA_FALSE); | 128 | EINA_MAGIC_CHECK_STRBUF(buf, EINA_FALSE); |
129 | return eina_strbuf_common_append_length(_STRBUF_CSIZE, buf, slice.mem, slice.len); | 129 | return eina_strbuf_common_append_length(_STRBUF_CSIZE, buf, slice.mem, slice.len); |
130 | } | 130 | } |
131 | 131 | ||
132 | EAPI Eina_Bool | 132 | EINA_API Eina_Bool |
133 | _FUNC_EXPAND(append_buffer)(_STRBUF_STRUCT_NAME *buf, const _STRBUF_STRUCT_NAME *data) | 133 | _FUNC_EXPAND(append_buffer)(_STRBUF_STRUCT_NAME *buf, const _STRBUF_STRUCT_NAME *data) |
134 | { | 134 | { |
135 | EINA_MAGIC_CHECK_STRBUF(buf, EINA_FALSE); | 135 | EINA_MAGIC_CHECK_STRBUF(buf, EINA_FALSE); |
@@ -138,70 +138,70 @@ _FUNC_EXPAND(append_buffer)(_STRBUF_STRUCT_NAME *buf, const _STRBUF_STRUCT_NAME | |||
138 | return eina_strbuf_common_append_length(_STRBUF_CSIZE, buf, (_STRBUF_DATA_TYPE *) eina_strbuf_common_string_get(data), eina_strbuf_common_length_get(data)); | 138 | return eina_strbuf_common_append_length(_STRBUF_CSIZE, buf, (_STRBUF_DATA_TYPE *) eina_strbuf_common_string_get(data), eina_strbuf_common_length_get(data)); |
139 | } | 139 | } |
140 | 140 | ||
141 | EAPI Eina_Bool | 141 | EINA_API Eina_Bool |
142 | _FUNC_EXPAND(insert_length)(_STRBUF_STRUCT_NAME *buf, const _STRBUF_DATA_TYPE *str, size_t length, size_t pos) | 142 | _FUNC_EXPAND(insert_length)(_STRBUF_STRUCT_NAME *buf, const _STRBUF_DATA_TYPE *str, size_t length, size_t pos) |
143 | { | 143 | { |
144 | EINA_MAGIC_CHECK_STRBUF(buf, EINA_FALSE); | 144 | EINA_MAGIC_CHECK_STRBUF(buf, EINA_FALSE); |
145 | return eina_strbuf_common_insert_length(_STRBUF_CSIZE, buf, (const void *) str, length, pos); | 145 | return eina_strbuf_common_insert_length(_STRBUF_CSIZE, buf, (const void *) str, length, pos); |
146 | } | 146 | } |
147 | 147 | ||
148 | EAPI Eina_Bool | 148 | EINA_API Eina_Bool |
149 | _FUNC_EXPAND(insert_slice)(_STRBUF_STRUCT_NAME *buf, const Eina_Slice slice, size_t pos) | 149 | _FUNC_EXPAND(insert_slice)(_STRBUF_STRUCT_NAME *buf, const Eina_Slice slice, size_t pos) |
150 | { | 150 | { |
151 | EINA_MAGIC_CHECK_STRBUF(buf, EINA_FALSE); | 151 | EINA_MAGIC_CHECK_STRBUF(buf, EINA_FALSE); |
152 | return eina_strbuf_common_insert_length(_STRBUF_CSIZE, buf, slice.mem, slice.len, pos); | 152 | return eina_strbuf_common_insert_length(_STRBUF_CSIZE, buf, slice.mem, slice.len, pos); |
153 | } | 153 | } |
154 | 154 | ||
155 | EAPI Eina_Bool | 155 | EINA_API Eina_Bool |
156 | _FUNC_EXPAND(append_char)(_STRBUF_STRUCT_NAME *buf, _STRBUF_DATA_TYPE c) | 156 | _FUNC_EXPAND(append_char)(_STRBUF_STRUCT_NAME *buf, _STRBUF_DATA_TYPE c) |
157 | { | 157 | { |
158 | EINA_MAGIC_CHECK_STRBUF(buf, EINA_FALSE); | 158 | EINA_MAGIC_CHECK_STRBUF(buf, EINA_FALSE); |
159 | return eina_strbuf_common_append_char(_STRBUF_CSIZE, buf, (const void *) &c); | 159 | return eina_strbuf_common_append_char(_STRBUF_CSIZE, buf, (const void *) &c); |
160 | } | 160 | } |
161 | 161 | ||
162 | EAPI Eina_Bool | 162 | EINA_API Eina_Bool |
163 | _FUNC_EXPAND(insert_char)(_STRBUF_STRUCT_NAME *buf, _STRBUF_DATA_TYPE c, size_t pos) | 163 | _FUNC_EXPAND(insert_char)(_STRBUF_STRUCT_NAME *buf, _STRBUF_DATA_TYPE c, size_t pos) |
164 | { | 164 | { |
165 | EINA_MAGIC_CHECK_STRBUF(buf, EINA_FALSE); | 165 | EINA_MAGIC_CHECK_STRBUF(buf, EINA_FALSE); |
166 | return eina_strbuf_common_insert_char(_STRBUF_CSIZE, buf, (const void *) &c, pos); | 166 | return eina_strbuf_common_insert_char(_STRBUF_CSIZE, buf, (const void *) &c, pos); |
167 | } | 167 | } |
168 | 168 | ||
169 | EAPI Eina_Bool | 169 | EINA_API Eina_Bool |
170 | _FUNC_EXPAND(remove)(_STRBUF_STRUCT_NAME *buf, size_t start, size_t end) | 170 | _FUNC_EXPAND(remove)(_STRBUF_STRUCT_NAME *buf, size_t start, size_t end) |
171 | { | 171 | { |
172 | EINA_MAGIC_CHECK_STRBUF(buf, EINA_FALSE); | 172 | EINA_MAGIC_CHECK_STRBUF(buf, EINA_FALSE); |
173 | return eina_strbuf_common_remove(_STRBUF_CSIZE, buf, start, end); | 173 | return eina_strbuf_common_remove(_STRBUF_CSIZE, buf, start, end); |
174 | } | 174 | } |
175 | 175 | ||
176 | EAPI const _STRBUF_DATA_TYPE * | 176 | EINA_API const _STRBUF_DATA_TYPE * |
177 | _FUNC_EXPAND(string_get)(const _STRBUF_STRUCT_NAME *buf) | 177 | _FUNC_EXPAND(string_get)(const _STRBUF_STRUCT_NAME *buf) |
178 | { | 178 | { |
179 | EINA_MAGIC_CHECK_STRBUF(buf, NULL); | 179 | EINA_MAGIC_CHECK_STRBUF(buf, NULL); |
180 | return (const _STRBUF_DATA_TYPE *) eina_strbuf_common_string_get(buf); | 180 | return (const _STRBUF_DATA_TYPE *) eina_strbuf_common_string_get(buf); |
181 | } | 181 | } |
182 | 182 | ||
183 | EAPI _STRBUF_DATA_TYPE * | 183 | EINA_API _STRBUF_DATA_TYPE * |
184 | _FUNC_EXPAND(string_steal)(_STRBUF_STRUCT_NAME *buf) | 184 | _FUNC_EXPAND(string_steal)(_STRBUF_STRUCT_NAME *buf) |
185 | { | 185 | { |
186 | EINA_MAGIC_CHECK_STRBUF(buf, NULL); | 186 | EINA_MAGIC_CHECK_STRBUF(buf, NULL); |
187 | return (_STRBUF_DATA_TYPE *) eina_strbuf_common_string_steal(_STRBUF_CSIZE, buf); | 187 | return (_STRBUF_DATA_TYPE *) eina_strbuf_common_string_steal(_STRBUF_CSIZE, buf); |
188 | } | 188 | } |
189 | 189 | ||
190 | EAPI void | 190 | EINA_API void |
191 | _FUNC_EXPAND(string_free)(_STRBUF_STRUCT_NAME *buf) | 191 | _FUNC_EXPAND(string_free)(_STRBUF_STRUCT_NAME *buf) |
192 | { | 192 | { |
193 | EINA_MAGIC_CHECK_STRBUF(buf); | 193 | EINA_MAGIC_CHECK_STRBUF(buf); |
194 | eina_strbuf_common_string_free(_STRBUF_CSIZE, buf); | 194 | eina_strbuf_common_string_free(_STRBUF_CSIZE, buf); |
195 | } | 195 | } |
196 | 196 | ||
197 | EAPI size_t | 197 | EINA_API size_t |
198 | _FUNC_EXPAND(length_get)(const _STRBUF_STRUCT_NAME *buf) | 198 | _FUNC_EXPAND(length_get)(const _STRBUF_STRUCT_NAME *buf) |
199 | { | 199 | { |
200 | EINA_MAGIC_CHECK_STRBUF(buf, 0); | 200 | EINA_MAGIC_CHECK_STRBUF(buf, 0); |
201 | return eina_strbuf_common_length_get(buf); | 201 | return eina_strbuf_common_length_get(buf); |
202 | } | 202 | } |
203 | 203 | ||
204 | EAPI Eina_Slice | 204 | EINA_API Eina_Slice |
205 | _FUNC_EXPAND(slice_get)(const _STRBUF_STRUCT_NAME *buf) | 205 | _FUNC_EXPAND(slice_get)(const _STRBUF_STRUCT_NAME *buf) |
206 | { | 206 | { |
207 | Eina_Slice ret = {.len = 0, .mem = NULL}; | 207 | Eina_Slice ret = {.len = 0, .mem = NULL}; |
@@ -209,7 +209,7 @@ _FUNC_EXPAND(slice_get)(const _STRBUF_STRUCT_NAME *buf) | |||
209 | return eina_strbuf_common_slice_get(buf); | 209 | return eina_strbuf_common_slice_get(buf); |
210 | } | 210 | } |
211 | 211 | ||
212 | EAPI Eina_Rw_Slice | 212 | EINA_API Eina_Rw_Slice |
213 | _FUNC_EXPAND(rw_slice_get)(const _STRBUF_STRUCT_NAME *buf) | 213 | _FUNC_EXPAND(rw_slice_get)(const _STRBUF_STRUCT_NAME *buf) |
214 | { | 214 | { |
215 | Eina_Rw_Slice ret = {.len = 0, .mem = NULL}; | 215 | Eina_Rw_Slice ret = {.len = 0, .mem = NULL}; |
@@ -217,7 +217,7 @@ _FUNC_EXPAND(rw_slice_get)(const _STRBUF_STRUCT_NAME *buf) | |||
217 | return eina_strbuf_common_rw_slice_get(buf); | 217 | return eina_strbuf_common_rw_slice_get(buf); |
218 | } | 218 | } |
219 | 219 | ||
220 | EAPI _STRBUF_DATA_TYPE* | 220 | EINA_API _STRBUF_DATA_TYPE* |
221 | _FUNC_EXPAND(release)(_STRBUF_STRUCT_NAME *buf) | 221 | _FUNC_EXPAND(release)(_STRBUF_STRUCT_NAME *buf) |
222 | { | 222 | { |
223 | _STRBUF_DATA_TYPE *result; | 223 | _STRBUF_DATA_TYPE *result; |
diff --git a/src/lib/eina/eina_binshare.c b/src/lib/eina/eina_binshare.c index 65edf841a4..84d0aa5208 100644 --- a/src/lib/eina/eina_binshare.c +++ b/src/lib/eina/eina_binshare.c | |||
@@ -83,7 +83,7 @@ static const char EINA_MAGIC_BINSHARE_NODE_STR[] = "Eina Binshare Node"; | |||
83 | * | 83 | * |
84 | * @see eina_init() | 84 | * @see eina_init() |
85 | */ | 85 | */ |
86 | EAPI Eina_Bool | 86 | EINA_API Eina_Bool |
87 | eina_binshare_init(void) | 87 | eina_binshare_init(void) |
88 | { | 88 | { |
89 | Eina_Bool ret; | 89 | Eina_Bool ret; |
@@ -124,7 +124,7 @@ eina_binshare_init(void) | |||
124 | * | 124 | * |
125 | * @see eina_shutdown() | 125 | * @see eina_shutdown() |
126 | */ | 126 | */ |
127 | EAPI Eina_Bool | 127 | EINA_API Eina_Bool |
128 | eina_binshare_shutdown(void) | 128 | eina_binshare_shutdown(void) |
129 | { | 129 | { |
130 | Eina_Bool ret; | 130 | Eina_Bool ret; |
@@ -144,7 +144,7 @@ eina_binshare_shutdown(void) | |||
144 | * API * | 144 | * API * |
145 | *============================================================================*/ | 145 | *============================================================================*/ |
146 | 146 | ||
147 | EAPI void | 147 | EINA_API void |
148 | eina_binshare_del(const void *obj) | 148 | eina_binshare_del(const void *obj) |
149 | { | 149 | { |
150 | if (!obj) | 150 | if (!obj) |
@@ -154,7 +154,7 @@ eina_binshare_del(const void *obj) | |||
154 | CRI("EEEK trying to del non-shared binshare %p", obj); | 154 | CRI("EEEK trying to del non-shared binshare %p", obj); |
155 | } | 155 | } |
156 | 156 | ||
157 | EAPI const void * | 157 | EINA_API const void * |
158 | eina_binshare_add_length(const void *obj, unsigned int olen) | 158 | eina_binshare_add_length(const void *obj, unsigned int olen) |
159 | { | 159 | { |
160 | return eina_share_common_add_length(binshare_share, | 160 | return eina_share_common_add_length(binshare_share, |
@@ -163,19 +163,19 @@ eina_binshare_add_length(const void *obj, unsigned int olen) | |||
163 | 0); | 163 | 0); |
164 | } | 164 | } |
165 | 165 | ||
166 | EAPI const void * | 166 | EINA_API const void * |
167 | eina_binshare_ref(const void *obj) | 167 | eina_binshare_ref(const void *obj) |
168 | { | 168 | { |
169 | return eina_share_common_ref(binshare_share, obj); | 169 | return eina_share_common_ref(binshare_share, obj); |
170 | } | 170 | } |
171 | 171 | ||
172 | EAPI int | 172 | EINA_API int |
173 | eina_binshare_length(const void *obj) | 173 | eina_binshare_length(const void *obj) |
174 | { | 174 | { |
175 | return eina_share_common_length(binshare_share, obj); | 175 | return eina_share_common_length(binshare_share, obj); |
176 | } | 176 | } |
177 | 177 | ||
178 | EAPI void | 178 | EINA_API void |
179 | eina_binshare_dump(void) | 179 | eina_binshare_dump(void) |
180 | { | 180 | { |
181 | eina_share_common_dump(binshare_share, NULL, 0); | 181 | eina_share_common_dump(binshare_share, NULL, 0); |
diff --git a/src/lib/eina/eina_binshare.h b/src/lib/eina/eina_binshare.h index 6caee100b1..31ec3cd237 100644 --- a/src/lib/eina/eina_binshare.h +++ b/src/lib/eina/eina_binshare.h | |||
@@ -93,7 +93,7 @@ | |||
93 | * | 93 | * |
94 | * @see eina_binshare_add() | 94 | * @see eina_binshare_add() |
95 | */ | 95 | */ |
96 | EAPI const void *eina_binshare_add_length(const void *obj, | 96 | EINA_API const void *eina_binshare_add_length(const void *obj, |
97 | unsigned int olen) EINA_WARN_UNUSED_RESULT; | 97 | unsigned int olen) EINA_WARN_UNUSED_RESULT; |
98 | 98 | ||
99 | /** | 99 | /** |
@@ -110,7 +110,7 @@ EAPI const void *eina_binshare_add_length(const void *obj, | |||
110 | * | 110 | * |
111 | * @note There is no unref since this is the work of eina_binshare_del(). | 111 | * @note There is no unref since this is the work of eina_binshare_del(). |
112 | */ | 112 | */ |
113 | EAPI const void *eina_binshare_ref(const void *obj); | 113 | EINA_API const void *eina_binshare_ref(const void *obj); |
114 | 114 | ||
115 | /** | 115 | /** |
116 | * @brief Notes that the given object has lost an instance. | 116 | * @brief Notes that the given object has lost an instance. |
@@ -125,7 +125,7 @@ EAPI const void *eina_binshare_ref(const void *obj); | |||
125 | * @warning If the given pointer is not shared, bad things happen, mostly a | 125 | * @warning If the given pointer is not shared, bad things happen, mostly a |
126 | * segmentation fault. | 126 | * segmentation fault. |
127 | */ | 127 | */ |
128 | EAPI void eina_binshare_del(const void *obj); | 128 | EINA_API void eina_binshare_del(const void *obj); |
129 | 129 | ||
130 | /** | 130 | /** |
131 | * @brief Notes that the given object @b must be shared. | 131 | * @brief Notes that the given object @b must be shared. |
@@ -138,7 +138,7 @@ EAPI void eina_binshare_del(const void *obj); | |||
138 | * @warning If the given pointer is not shared, bad things happen, mostly a | 138 | * @warning If the given pointer is not shared, bad things happen, mostly a |
139 | * segmentation fault. If in doubt, try strlen(). | 139 | * segmentation fault. If in doubt, try strlen(). |
140 | */ | 140 | */ |
141 | EAPI int eina_binshare_length(const void *obj) EINA_WARN_UNUSED_RESULT EINA_PURE; | 141 | EINA_API int eina_binshare_length(const void *obj) EINA_WARN_UNUSED_RESULT EINA_PURE; |
142 | 142 | ||
143 | /** | 143 | /** |
144 | * @brief Dumps the contents of share_common. | 144 | * @brief Dumps the contents of share_common. |
@@ -146,7 +146,7 @@ EAPI int eina_binshare_length(const void *obj) EINA_WARN_UNUSED_RESULT E | |||
146 | * @details This function dumps all the objects from share_common to stdout with a | 146 | * @details This function dumps all the objects from share_common to stdout with a |
147 | * DDD: prefix per line and a memory usage summary. | 147 | * DDD: prefix per line and a memory usage summary. |
148 | */ | 148 | */ |
149 | EAPI void eina_binshare_dump(void); | 149 | EINA_API void eina_binshare_dump(void); |
150 | 150 | ||
151 | /** | 151 | /** |
152 | * @brief Retrieves an instance of a blob for use in a program. | 152 | * @brief Retrieves an instance of a blob for use in a program. |
diff --git a/src/lib/eina/eina_convert.c b/src/lib/eina/eina_convert.c index 4683215df5..422459c00c 100644 --- a/src/lib/eina/eina_convert.c +++ b/src/lib/eina/eina_convert.c | |||
@@ -91,9 +91,9 @@ static inline void reverse(char s[], int length) | |||
91 | * @cond LOCAL | 91 | * @cond LOCAL |
92 | */ | 92 | */ |
93 | 93 | ||
94 | EAPI Eina_Error EINA_ERROR_CONVERT_P_NOT_FOUND = 0; | 94 | EINA_API Eina_Error EINA_ERROR_CONVERT_P_NOT_FOUND = 0; |
95 | EAPI Eina_Error EINA_ERROR_CONVERT_0X_NOT_FOUND = 0; | 95 | EINA_API Eina_Error EINA_ERROR_CONVERT_0X_NOT_FOUND = 0; |
96 | EAPI Eina_Error EINA_ERROR_CONVERT_OUTRUN_STRING_LENGTH = 0; | 96 | EINA_API Eina_Error EINA_ERROR_CONVERT_OUTRUN_STRING_LENGTH = 0; |
97 | 97 | ||
98 | /** | 98 | /** |
99 | * @endcond | 99 | * @endcond |
@@ -150,7 +150,7 @@ eina_convert_shutdown(void) | |||
150 | * Come from the second edition of The C Programming Language ("K&R2") on page 64 | 150 | * Come from the second edition of The C Programming Language ("K&R2") on page 64 |
151 | */ | 151 | */ |
152 | 152 | ||
153 | EAPI int | 153 | EINA_API int |
154 | eina_convert_itoa(int n, char *s) | 154 | eina_convert_itoa(int n, char *s) |
155 | { | 155 | { |
156 | int i = 0; | 156 | int i = 0; |
@@ -175,7 +175,7 @@ eina_convert_itoa(int n, char *s) | |||
175 | return i + r; | 175 | return i + r; |
176 | } | 176 | } |
177 | 177 | ||
178 | EAPI int | 178 | EINA_API int |
179 | eina_convert_xtoa(unsigned int n, char *s) | 179 | eina_convert_xtoa(unsigned int n, char *s) |
180 | { | 180 | { |
181 | int i; | 181 | int i; |
@@ -194,7 +194,7 @@ eina_convert_xtoa(unsigned int n, char *s) | |||
194 | return i; | 194 | return i; |
195 | } | 195 | } |
196 | 196 | ||
197 | EAPI Eina_Bool | 197 | EINA_API Eina_Bool |
198 | eina_convert_atod(const char *src, int length, long long *m, long *e) | 198 | eina_convert_atod(const char *src, int length, long long *m, long *e) |
199 | { | 199 | { |
200 | const char *str = src; | 200 | const char *str = src; |
@@ -286,7 +286,7 @@ on_length_error: | |||
286 | return EINA_FALSE; | 286 | return EINA_FALSE; |
287 | } | 287 | } |
288 | 288 | ||
289 | EAPI int | 289 | EINA_API int |
290 | eina_convert_dtoa(double d, char *des) | 290 | eina_convert_dtoa(double d, char *des) |
291 | { | 291 | { |
292 | int length = 0; | 292 | int length = 0; |
@@ -350,7 +350,7 @@ eina_convert_dtoa(double d, char *des) | |||
350 | return length + eina_convert_itoa(p, des); | 350 | return length + eina_convert_itoa(p, des); |
351 | } | 351 | } |
352 | 352 | ||
353 | EAPI int | 353 | EINA_API int |
354 | eina_convert_fptoa(Eina_F32p32 fp, char *des) | 354 | eina_convert_fptoa(Eina_F32p32 fp, char *des) |
355 | { | 355 | { |
356 | int length = 0; | 356 | int length = 0; |
@@ -434,7 +434,7 @@ eina_convert_fptoa(Eina_F32p32 fp, char *des) | |||
434 | return length + eina_convert_itoa(p, des); | 434 | return length + eina_convert_itoa(p, des); |
435 | } | 435 | } |
436 | 436 | ||
437 | EAPI Eina_Bool | 437 | EINA_API Eina_Bool |
438 | eina_convert_atofp(const char *src, int length, Eina_F32p32 *fp) | 438 | eina_convert_atofp(const char *src, int length, Eina_F32p32 *fp) |
439 | { | 439 | { |
440 | long long m; | 440 | long long m; |
@@ -468,7 +468,7 @@ eina_convert_atofp(const char *src, int length, Eina_F32p32 *fp) | |||
468 | * No hexadecimal form supported | 468 | * No hexadecimal form supported |
469 | * no sequence supported after NAN | 469 | * no sequence supported after NAN |
470 | */ | 470 | */ |
471 | EAPI double | 471 | EINA_API double |
472 | eina_convert_strtod_c(const char *nptr, char **endptr) | 472 | eina_convert_strtod_c(const char *nptr, char **endptr) |
473 | { | 473 | { |
474 | const char *iter; | 474 | const char *iter; |
diff --git a/src/lib/eina/eina_convert.h b/src/lib/eina/eina_convert.h index 314cd4cf92..8c41ac74dd 100644 --- a/src/lib/eina/eina_convert.h +++ b/src/lib/eina/eina_convert.h | |||
@@ -158,9 +158,9 @@ | |||
158 | * @{ | 158 | * @{ |
159 | */ | 159 | */ |
160 | 160 | ||
161 | EAPI extern Eina_Error EINA_ERROR_CONVERT_P_NOT_FOUND; /**< Not used, perhaps a placeholder? Defined as 0 in eina_convert.c*/ | 161 | EINA_API extern Eina_Error EINA_ERROR_CONVERT_P_NOT_FOUND; /**< Not used, perhaps a placeholder? Defined as 0 in eina_convert.c*/ |
162 | EAPI extern Eina_Error EINA_ERROR_CONVERT_0X_NOT_FOUND; /**< Not used, perhaps a placeholder? Defined as 0 in eina_convert.c*/ | 162 | EINA_API extern Eina_Error EINA_ERROR_CONVERT_0X_NOT_FOUND; /**< Not used, perhaps a placeholder? Defined as 0 in eina_convert.c*/ |
163 | EAPI extern Eina_Error EINA_ERROR_CONVERT_OUTRUN_STRING_LENGTH; /**< Not used, perhaps a placeholder? Defined as 0 in eina_convert.c*/ | 163 | EINA_API extern Eina_Error EINA_ERROR_CONVERT_OUTRUN_STRING_LENGTH; /**< Not used, perhaps a placeholder? Defined as 0 in eina_convert.c*/ |
164 | 164 | ||
165 | /** | 165 | /** |
166 | * @brief Converts an integer number to a string in decimal base. | 166 | * @brief Converts an integer number to a string in decimal base. |
@@ -177,7 +177,7 @@ EAPI extern Eina_Error EINA_ERROR_CONVERT_OUTRUN_STRING_LENGTH; /**< Not used, p | |||
177 | * The returned value is the length of the string, including the null | 177 | * The returned value is the length of the string, including the null |
178 | * terminated character. | 178 | * terminated character. |
179 | */ | 179 | */ |
180 | EAPI int eina_convert_itoa(int n, char *s) EINA_ARG_NONNULL(2); | 180 | EINA_API int eina_convert_itoa(int n, char *s) EINA_ARG_NONNULL(2); |
181 | 181 | ||
182 | /** | 182 | /** |
183 | * @brief Converts an integer number to a string in hexadecimal base. | 183 | * @brief Converts an integer number to a string in hexadecimal base. |
@@ -195,7 +195,7 @@ EAPI int eina_convert_itoa(int n, char *s) EINA_ARG_NONNULL(2); | |||
195 | * The returned value is the length of the string, including the nul | 195 | * The returned value is the length of the string, including the nul |
196 | * terminated character. | 196 | * terminated character. |
197 | */ | 197 | */ |
198 | EAPI int eina_convert_xtoa(unsigned int n, char *s) EINA_ARG_NONNULL(2); | 198 | EINA_API int eina_convert_xtoa(unsigned int n, char *s) EINA_ARG_NONNULL(2); |
199 | 199 | ||
200 | 200 | ||
201 | /** | 201 | /** |
@@ -220,7 +220,7 @@ EAPI int eina_convert_xtoa(unsigned int n, char *s) EINA_ARG_NONNULL(2); | |||
220 | * The returned value is the length of the string, including the null | 220 | * The returned value is the length of the string, including the null |
221 | * character. | 221 | * character. |
222 | */ | 222 | */ |
223 | EAPI int eina_convert_dtoa(double d, char *des) EINA_ARG_NONNULL(2); | 223 | EINA_API int eina_convert_dtoa(double d, char *des) EINA_ARG_NONNULL(2); |
224 | 224 | ||
225 | /** | 225 | /** |
226 | * @brief Converts a string to a double. | 226 | * @brief Converts a string to a double. |
@@ -257,7 +257,7 @@ EAPI int eina_convert_dtoa(double d, char *des) EINA_ARG_NONNULL(2); | |||
257 | * If the string is invalid #EINA_FALSE is returned, otherwise #EINA_TRUE is | 257 | * If the string is invalid #EINA_FALSE is returned, otherwise #EINA_TRUE is |
258 | * returned. | 258 | * returned. |
259 | */ | 259 | */ |
260 | EAPI Eina_Bool eina_convert_atod(const char *src, | 260 | EINA_API Eina_Bool eina_convert_atod(const char *src, |
261 | int length, | 261 | int length, |
262 | long long *m, | 262 | long long *m, |
263 | long *e) EINA_ARG_NONNULL(1, 3, 4); | 263 | long *e) EINA_ARG_NONNULL(1, 3, 4); |
@@ -289,7 +289,7 @@ EAPI Eina_Bool eina_convert_atod(const char *src, | |||
289 | * implements the frexp() function for fixed point numbers and does | 289 | * implements the frexp() function for fixed point numbers and does |
290 | * some optimization. | 290 | * some optimization. |
291 | */ | 291 | */ |
292 | EAPI int eina_convert_fptoa(Eina_F32p32 fp, | 292 | EINA_API int eina_convert_fptoa(Eina_F32p32 fp, |
293 | char *des) EINA_ARG_NONNULL(2); | 293 | char *des) EINA_ARG_NONNULL(2); |
294 | 294 | ||
295 | /** | 295 | /** |
@@ -329,7 +329,7 @@ EAPI int eina_convert_fptoa(Eina_F32p32 fp, | |||
329 | * @note The code uses eina_convert_atod() and do the correct bit | 329 | * @note The code uses eina_convert_atod() and do the correct bit |
330 | * shift to compute the fixed point number. | 330 | * shift to compute the fixed point number. |
331 | */ | 331 | */ |
332 | EAPI Eina_Bool eina_convert_atofp(const char *src, | 332 | EINA_API Eina_Bool eina_convert_atofp(const char *src, |
333 | int length, | 333 | int length, |
334 | Eina_F32p32 *fp) EINA_ARG_NONNULL(1, 3); | 334 | Eina_F32p32 *fp) EINA_ARG_NONNULL(1, 3); |
335 | 335 | ||
@@ -347,7 +347,7 @@ EAPI Eina_Bool eina_convert_atofp(const char *src, | |||
347 | * without locale-dependency, this function can replace strtod. | 347 | * without locale-dependency, this function can replace strtod. |
348 | * For more information, please refer documents of strtod, strtod_l. | 348 | * For more information, please refer documents of strtod, strtod_l. |
349 | */ | 349 | */ |
350 | EAPI double eina_convert_strtod_c(const char *nptr, char **endptr); | 350 | EINA_API double eina_convert_strtod_c(const char *nptr, char **endptr); |
351 | 351 | ||
352 | /** | 352 | /** |
353 | * @} | 353 | * @} |
diff --git a/src/lib/eina/eina_counter.c b/src/lib/eina/eina_counter.c index 1143c566fa..dc89f28f33 100644 --- a/src/lib/eina/eina_counter.c +++ b/src/lib/eina/eina_counter.c | |||
@@ -113,7 +113,7 @@ _eina_counter_asiprintf(char *base, int *position, const char *format, ...) | |||
113 | * API * | 113 | * API * |
114 | *============================================================================*/ | 114 | *============================================================================*/ |
115 | 115 | ||
116 | EAPI Eina_Counter * | 116 | EINA_API Eina_Counter * |
117 | eina_counter_new(const char *name) | 117 | eina_counter_new(const char *name) |
118 | { | 118 | { |
119 | Eina_Counter *counter; | 119 | Eina_Counter *counter; |
@@ -131,7 +131,7 @@ eina_counter_new(const char *name) | |||
131 | return counter; | 131 | return counter; |
132 | } | 132 | } |
133 | 133 | ||
134 | EAPI void | 134 | EINA_API void |
135 | eina_counter_free(Eina_Counter *counter) | 135 | eina_counter_free(Eina_Counter *counter) |
136 | { | 136 | { |
137 | EINA_SAFETY_ON_NULL_RETURN(counter); | 137 | EINA_SAFETY_ON_NULL_RETURN(counter); |
@@ -147,7 +147,7 @@ eina_counter_free(Eina_Counter *counter) | |||
147 | free(counter); | 147 | free(counter); |
148 | } | 148 | } |
149 | 149 | ||
150 | EAPI void | 150 | EINA_API void |
151 | eina_counter_start(Eina_Counter *counter) | 151 | eina_counter_start(Eina_Counter *counter) |
152 | { | 152 | { |
153 | Eina_Clock *clk; | 153 | Eina_Clock *clk; |
@@ -165,7 +165,7 @@ eina_counter_start(Eina_Counter *counter) | |||
165 | clk->start = tp; | 165 | clk->start = tp; |
166 | } | 166 | } |
167 | 167 | ||
168 | EAPI void | 168 | EINA_API void |
169 | eina_counter_stop(Eina_Counter *counter, int specimen) | 169 | eina_counter_stop(Eina_Counter *counter, int specimen) |
170 | { | 170 | { |
171 | Eina_Clock *clk; | 171 | Eina_Clock *clk; |
@@ -185,7 +185,7 @@ eina_counter_stop(Eina_Counter *counter, int specimen) | |||
185 | clk->valid = EINA_TRUE; | 185 | clk->valid = EINA_TRUE; |
186 | } | 186 | } |
187 | 187 | ||
188 | EAPI char * | 188 | EINA_API char * |
189 | eina_counter_dump(Eina_Counter *counter) | 189 | eina_counter_dump(Eina_Counter *counter) |
190 | { | 190 | { |
191 | Eina_Clock *clk; | 191 | Eina_Clock *clk; |
diff --git a/src/lib/eina/eina_counter.h b/src/lib/eina/eina_counter.h index 6cb15b982b..f498942d2e 100644 --- a/src/lib/eina/eina_counter.h +++ b/src/lib/eina/eina_counter.h | |||
@@ -124,7 +124,7 @@ typedef struct _Eina_Counter Eina_Counter; | |||
124 | * @note When the new counter is not needed anymore, use eina_counter_free() to | 124 | * @note When the new counter is not needed anymore, use eina_counter_free() to |
125 | * free the allocated memory. | 125 | * free the allocated memory. |
126 | */ | 126 | */ |
127 | EAPI Eina_Counter *eina_counter_new(const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | 127 | EINA_API Eina_Counter *eina_counter_new(const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); |
128 | 128 | ||
129 | /** | 129 | /** |
130 | * @brief Deletes a counter. | 130 | * @brief Deletes a counter. |
@@ -135,7 +135,7 @@ EAPI Eina_Counter *eina_counter_new(const char *name) EINA_WARN_UNUSED_RESULT EI | |||
135 | * @param[in] counter The counter to delete | 135 | * @param[in] counter The counter to delete |
136 | * | 136 | * |
137 | */ | 137 | */ |
138 | EAPI void eina_counter_free(Eina_Counter *counter) EINA_ARG_NONNULL(1); | 138 | EINA_API void eina_counter_free(Eina_Counter *counter) EINA_ARG_NONNULL(1); |
139 | 139 | ||
140 | /** | 140 | /** |
141 | * @brief Starts the time count. | 141 | * @brief Starts the time count. |
@@ -152,7 +152,7 @@ EAPI void eina_counter_free(Eina_Counter *counter) EINA_ARG_NONNULL(1); | |||
152 | * @note To stop the timing, eina_counter_stop() must be called with the | 152 | * @note To stop the timing, eina_counter_stop() must be called with the |
153 | * same counter. | 153 | * same counter. |
154 | */ | 154 | */ |
155 | EAPI void eina_counter_start(Eina_Counter *counter) EINA_ARG_NONNULL(1); | 155 | EINA_API void eina_counter_start(Eina_Counter *counter) EINA_ARG_NONNULL(1); |
156 | 156 | ||
157 | /** | 157 | /** |
158 | * @brief Stops the time count. | 158 | * @brief Stops the time count. |
@@ -165,7 +165,7 @@ EAPI void eina_counter_start(Eina_Counter *counter) EINA_ARG_NONNULL(1) | |||
165 | * @param[in] specimen The number of the test | 165 | * @param[in] specimen The number of the test |
166 | * | 166 | * |
167 | */ | 167 | */ |
168 | EAPI void eina_counter_stop(Eina_Counter *counter, | 168 | EINA_API void eina_counter_stop(Eina_Counter *counter, |
169 | int specimen) EINA_ARG_NONNULL(1); | 169 | int specimen) EINA_ARG_NONNULL(1); |
170 | 170 | ||
171 | /** | 171 | /** |
@@ -185,7 +185,7 @@ EAPI void eina_counter_stop(Eina_Counter *counter, | |||
185 | * | 185 | * |
186 | * @note The unit of time is nanoseconds. | 186 | * @note The unit of time is nanoseconds. |
187 | */ | 187 | */ |
188 | EAPI char *eina_counter_dump(Eina_Counter *counter) EINA_ARG_NONNULL(1); | 188 | EINA_API char *eina_counter_dump(Eina_Counter *counter) EINA_ARG_NONNULL(1); |
189 | 189 | ||
190 | /** | 190 | /** |
191 | * @} | 191 | * @} |
diff --git a/src/lib/eina/eina_cow.c b/src/lib/eina/eina_cow.c index 8737ff8e49..79c594a3f9 100644 --- a/src/lib/eina/eina_cow.c +++ b/src/lib/eina/eina_cow.c | |||
@@ -326,7 +326,7 @@ eina_cow_shutdown(void) | |||
326 | return EINA_TRUE; | 326 | return EINA_TRUE; |
327 | } | 327 | } |
328 | 328 | ||
329 | EAPI Eina_Cow * | 329 | EINA_API Eina_Cow * |
330 | eina_cow_add(const char *name, unsigned int struct_size, unsigned int step, const void *default_value, Eina_Bool gc) | 330 | eina_cow_add(const char *name, unsigned int struct_size, unsigned int step, const void *default_value, Eina_Bool gc) |
331 | { | 331 | { |
332 | const char *choice, *tmp; | 332 | const char *choice, *tmp; |
@@ -390,7 +390,7 @@ eina_cow_add(const char *name, unsigned int struct_size, unsigned int step, cons | |||
390 | return NULL; | 390 | return NULL; |
391 | } | 391 | } |
392 | 392 | ||
393 | EAPI void | 393 | EINA_API void |
394 | eina_cow_del(Eina_Cow *cow) | 394 | eina_cow_del(Eina_Cow *cow) |
395 | { | 395 | { |
396 | if (!cow) return; | 396 | if (!cow) return; |
@@ -405,7 +405,7 @@ eina_cow_del(Eina_Cow *cow) | |||
405 | free(cow); | 405 | free(cow); |
406 | } | 406 | } |
407 | 407 | ||
408 | EAPI const Eina_Cow_Data * | 408 | EINA_API const Eina_Cow_Data * |
409 | eina_cow_alloc(Eina_Cow *cow) | 409 | eina_cow_alloc(Eina_Cow *cow) |
410 | { | 410 | { |
411 | #ifdef EINA_COW_MAGIC_ON | 411 | #ifdef EINA_COW_MAGIC_ON |
@@ -415,7 +415,7 @@ eina_cow_alloc(Eina_Cow *cow) | |||
415 | return cow->default_value; | 415 | return cow->default_value; |
416 | } | 416 | } |
417 | 417 | ||
418 | EAPI void | 418 | EINA_API void |
419 | eina_cow_free(Eina_Cow *cow, const Eina_Cow_Data **data) | 419 | eina_cow_free(Eina_Cow *cow, const Eina_Cow_Data **data) |
420 | { | 420 | { |
421 | Eina_Cow_Ptr *ref; | 421 | Eina_Cow_Ptr *ref; |
@@ -451,7 +451,7 @@ eina_cow_free(Eina_Cow *cow, const Eina_Cow_Data **data) | |||
451 | eina_mempool_free(cow->pool, (void*) ref); | 451 | eina_mempool_free(cow->pool, (void*) ref); |
452 | } | 452 | } |
453 | 453 | ||
454 | EAPI void * | 454 | EINA_API void * |
455 | eina_cow_write(Eina_Cow *cow, | 455 | eina_cow_write(Eina_Cow *cow, |
456 | const Eina_Cow_Data * const *data) | 456 | const Eina_Cow_Data * const *data) |
457 | { | 457 | { |
@@ -535,7 +535,7 @@ eina_cow_write(Eina_Cow *cow, | |||
535 | return (void *) *data; | 535 | return (void *) *data; |
536 | } | 536 | } |
537 | 537 | ||
538 | EAPI void | 538 | EINA_API void |
539 | eina_cow_done(Eina_Cow *cow, | 539 | eina_cow_done(Eina_Cow *cow, |
540 | const Eina_Cow_Data * const * dst, | 540 | const Eina_Cow_Data * const * dst, |
541 | const void *data, | 541 | const void *data, |
@@ -569,7 +569,7 @@ eina_cow_done(Eina_Cow *cow, | |||
569 | _eina_cow_togc_add(cow, ref, (const Eina_Cow_Data **) dst); | 569 | _eina_cow_togc_add(cow, ref, (const Eina_Cow_Data **) dst); |
570 | } | 570 | } |
571 | 571 | ||
572 | EAPI void | 572 | EINA_API void |
573 | eina_cow_memcpy(Eina_Cow *cow, | 573 | eina_cow_memcpy(Eina_Cow *cow, |
574 | const Eina_Cow_Data * const *dst, | 574 | const Eina_Cow_Data * const *dst, |
575 | const Eina_Cow_Data *src) | 575 | const Eina_Cow_Data *src) |
@@ -603,7 +603,7 @@ eina_cow_memcpy(Eina_Cow *cow, | |||
603 | *((const void**)dst) = src; | 603 | *((const void**)dst) = src; |
604 | } | 604 | } |
605 | 605 | ||
606 | EAPI Eina_Bool | 606 | EINA_API Eina_Bool |
607 | eina_cow_gc(Eina_Cow *cow) | 607 | eina_cow_gc(Eina_Cow *cow) |
608 | { | 608 | { |
609 | Eina_Cow_GC *gc; | 609 | Eina_Cow_GC *gc; |
diff --git a/src/lib/eina/eina_cow.h b/src/lib/eina/eina_cow.h index 4836d3e870..f5a6473978 100644 --- a/src/lib/eina/eina_cow.h +++ b/src/lib/eina/eina_cow.h | |||
@@ -61,14 +61,14 @@ typedef void Eina_Cow_Data; | |||
61 | * @param[in] gc Is it possible to run garbage collection on this pool. | 61 | * @param[in] gc Is it possible to run garbage collection on this pool. |
62 | * @return A valid new Eina_Cow, or @c NULL on error. | 62 | * @return A valid new Eina_Cow, or @c NULL on error. |
63 | */ | 63 | */ |
64 | EAPI Eina_Cow *eina_cow_add(const char *name, unsigned int struct_size, unsigned int step, const void *default_value, Eina_Bool gc) EINA_WARN_UNUSED_RESULT; | 64 | EINA_API Eina_Cow *eina_cow_add(const char *name, unsigned int struct_size, unsigned int step, const void *default_value, Eina_Bool gc) EINA_WARN_UNUSED_RESULT; |
65 | 65 | ||
66 | /** | 66 | /** |
67 | * @brief Destroys an Eina_Cow pool and all the allocated memory. | 67 | * @brief Destroys an Eina_Cow pool and all the allocated memory. |
68 | * | 68 | * |
69 | * @param[in] cow The pool to destroy | 69 | * @param[in] cow The pool to destroy |
70 | */ | 70 | */ |
71 | EAPI void eina_cow_del(Eina_Cow *cow); | 71 | EINA_API void eina_cow_del(Eina_Cow *cow); |
72 | 72 | ||
73 | /** | 73 | /** |
74 | * @brief Returns an initialized pointer from the pool. | 74 | * @brief Returns an initialized pointer from the pool. |
@@ -76,7 +76,7 @@ EAPI void eina_cow_del(Eina_Cow *cow); | |||
76 | * @param[in] cow The pool to take things from. | 76 | * @param[in] cow The pool to take things from. |
77 | * @return A pointer to the new pool instance | 77 | * @return A pointer to the new pool instance |
78 | */ | 78 | */ |
79 | EAPI const Eina_Cow_Data *eina_cow_alloc(Eina_Cow *cow) EINA_WARN_UNUSED_RESULT; | 79 | EINA_API const Eina_Cow_Data *eina_cow_alloc(Eina_Cow *cow) EINA_WARN_UNUSED_RESULT; |
80 | 80 | ||
81 | /** | 81 | /** |
82 | * @brief Frees a pointer from the pool. | 82 | * @brief Frees a pointer from the pool. |
@@ -87,7 +87,7 @@ EAPI const Eina_Cow_Data *eina_cow_alloc(Eina_Cow *cow) EINA_WARN_UNUSED_RESULT; | |||
87 | * @note To simplify the caller code *data will point to the default | 87 | * @note To simplify the caller code *data will point to the default |
88 | * read only state after the call to this function. | 88 | * read only state after the call to this function. |
89 | */ | 89 | */ |
90 | EAPI void eina_cow_free(Eina_Cow *cow, const Eina_Cow_Data **data); | 90 | EINA_API void eina_cow_free(Eina_Cow *cow, const Eina_Cow_Data **data); |
91 | 91 | ||
92 | /** | 92 | /** |
93 | * @brief Gets a writeable pointer from a const pointer. | 93 | * @brief Gets a writeable pointer from a const pointer. |
@@ -97,7 +97,7 @@ EAPI void eina_cow_free(Eina_Cow *cow, const Eina_Cow_Data **data); | |||
97 | * | 97 | * |
98 | * @note This function is not thread safe. | 98 | * @note This function is not thread safe. |
99 | */ | 99 | */ |
100 | EAPI void *eina_cow_write(Eina_Cow *cow, | 100 | EINA_API void *eina_cow_write(Eina_Cow *cow, |
101 | const Eina_Cow_Data * const *src) EINA_WARN_UNUSED_RESULT; | 101 | const Eina_Cow_Data * const *src) EINA_WARN_UNUSED_RESULT; |
102 | 102 | ||
103 | /** | 103 | /** |
@@ -110,7 +110,7 @@ EAPI void *eina_cow_write(Eina_Cow *cow, | |||
110 | * | 110 | * |
111 | * @note This function is not thread safe. | 111 | * @note This function is not thread safe. |
112 | */ | 112 | */ |
113 | EAPI void eina_cow_done(Eina_Cow *cow, | 113 | EINA_API void eina_cow_done(Eina_Cow *cow, |
114 | const Eina_Cow_Data * const *dst, | 114 | const Eina_Cow_Data * const *dst, |
115 | const void *data, | 115 | const void *data, |
116 | Eina_Bool needed_gc); | 116 | Eina_Bool needed_gc); |
@@ -121,7 +121,7 @@ EAPI void eina_cow_done(Eina_Cow *cow, | |||
121 | * @param[in] dst The destination to update. | 121 | * @param[in] dst The destination to update. |
122 | * @param[in] src The source of information to copy. | 122 | * @param[in] src The source of information to copy. |
123 | */ | 123 | */ |
124 | EAPI void eina_cow_memcpy(Eina_Cow *cow, | 124 | EINA_API void eina_cow_memcpy(Eina_Cow *cow, |
125 | const Eina_Cow_Data * const *dst, | 125 | const Eina_Cow_Data * const *dst, |
126 | const Eina_Cow_Data *src); | 126 | const Eina_Cow_Data *src); |
127 | 127 | ||
@@ -135,7 +135,7 @@ EAPI void eina_cow_memcpy(Eina_Cow *cow, | |||
135 | * It does run a hash function on all possible common structures trying to | 135 | * It does run a hash function on all possible common structures trying to |
136 | * find the one that matches and merge them into one pointer. | 136 | * find the one that matches and merge them into one pointer. |
137 | */ | 137 | */ |
138 | EAPI Eina_Bool eina_cow_gc(Eina_Cow *cow); | 138 | EINA_API Eina_Bool eina_cow_gc(Eina_Cow *cow); |
139 | 139 | ||
140 | /** | 140 | /** |
141 | * @def EINA_COW_WRITE_BEGIN | 141 | * @def EINA_COW_WRITE_BEGIN |
diff --git a/src/lib/eina/eina_cpu.c b/src/lib/eina/eina_cpu.c index c61297803b..119b8d098d 100644 --- a/src/lib/eina/eina_cpu.c +++ b/src/lib/eina/eina_cpu.c | |||
@@ -165,7 +165,7 @@ _ppc_cpu_features(Eina_Cpu_Features *features) | |||
165 | /* FIXME the features checks should be called when this function is called? | 165 | /* FIXME the features checks should be called when this function is called? |
166 | * or make it static by doing eina_cpu_init() and return a local var | 166 | * or make it static by doing eina_cpu_init() and return a local var |
167 | */ | 167 | */ |
168 | EAPI Eina_Cpu_Features eina_cpu_features = 0; | 168 | EINA_API Eina_Cpu_Features eina_cpu_features = 0; |
169 | 169 | ||
170 | Eina_Bool | 170 | Eina_Bool |
171 | eina_cpu_init(void) | 171 | eina_cpu_init(void) |
@@ -192,7 +192,7 @@ eina_cpu_shutdown(void) | |||
192 | * | 192 | * |
193 | * @return | 193 | * @return |
194 | */ | 194 | */ |
195 | EAPI Eina_Cpu_Features eina_cpu_features_get(void) | 195 | EINA_API Eina_Cpu_Features eina_cpu_features_get(void) |
196 | { | 196 | { |
197 | return eina_cpu_features; | 197 | return eina_cpu_features; |
198 | } | 198 | } |
@@ -302,13 +302,13 @@ _eina_page_size(void) | |||
302 | } | 302 | } |
303 | } | 303 | } |
304 | 304 | ||
305 | EAPI int eina_cpu_page_size(void) | 305 | EINA_API int eina_cpu_page_size(void) |
306 | { | 306 | { |
307 | if (_page_size == 0) _eina_page_size(); | 307 | if (_page_size == 0) _eina_page_size(); |
308 | return _page_size; | 308 | return _page_size; |
309 | } | 309 | } |
310 | 310 | ||
311 | EAPI int eina_cpu_count(void) | 311 | EINA_API int eina_cpu_count(void) |
312 | { | 312 | { |
313 | return _cpu_count; | 313 | return _cpu_count; |
314 | } | 314 | } |
diff --git a/src/lib/eina/eina_cpu.h b/src/lib/eina/eina_cpu.h index c5724ab2c5..c17d46e22b 100644 --- a/src/lib/eina/eina_cpu.h +++ b/src/lib/eina/eina_cpu.h | |||
@@ -64,14 +64,14 @@ typedef enum _Eina_Cpu_Features | |||
64 | * | 64 | * |
65 | * @return the current cpu features | 65 | * @return the current cpu features |
66 | */ | 66 | */ |
67 | EAPI extern Eina_Cpu_Features eina_cpu_features; | 67 | EINA_API extern Eina_Cpu_Features eina_cpu_features; |
68 | 68 | ||
69 | /** | 69 | /** |
70 | * @brief Cpu features accessor. | 70 | * @brief Cpu features accessor. |
71 | * | 71 | * |
72 | * @return the current cpu features | 72 | * @return the current cpu features |
73 | */ | 73 | */ |
74 | EAPI Eina_Cpu_Features eina_cpu_features_get(void); | 74 | EINA_API Eina_Cpu_Features eina_cpu_features_get(void); |
75 | 75 | ||
76 | /** | 76 | /** |
77 | * @brief Gets the current number of processors. | 77 | * @brief Gets the current number of processors. |
@@ -79,7 +79,7 @@ EAPI Eina_Cpu_Features eina_cpu_features_get(void); | |||
79 | * @return The number of processors that are online, that | 79 | * @return The number of processors that are online, that |
80 | * is available when the function is called. | 80 | * is available when the function is called. |
81 | */ | 81 | */ |
82 | EAPI int eina_cpu_count(void); | 82 | EINA_API int eina_cpu_count(void); |
83 | 83 | ||
84 | /** | 84 | /** |
85 | * @brief Gets the current virtual page size. | 85 | * @brief Gets the current virtual page size. |
@@ -88,7 +88,7 @@ EAPI int eina_cpu_count(void); | |||
88 | * allocation performed by the operating system on behalf of the program, and | 88 | * allocation performed by the operating system on behalf of the program, and |
89 | * for transfers between the main memory and any other auxiliary store. | 89 | * for transfers between the main memory and any other auxiliary store. |
90 | */ | 90 | */ |
91 | EAPI int eina_cpu_page_size(void); | 91 | EINA_API int eina_cpu_page_size(void); |
92 | 92 | ||
93 | /** | 93 | /** |
94 | * @brief Reverses the byte order of a 16-bit (destination) register. | 94 | * @brief Reverses the byte order of a 16-bit (destination) register. |
diff --git a/src/lib/eina/eina_crc.c b/src/lib/eina/eina_crc.c index 69d0b2341c..616d07931c 100644 --- a/src/lib/eina/eina_crc.c +++ b/src/lib/eina/eina_crc.c | |||
@@ -287,7 +287,7 @@ static const unsigned int table[8][256] = | |||
287 | } | 287 | } |
288 | }; | 288 | }; |
289 | 289 | ||
290 | EAPI unsigned int | 290 | EINA_API unsigned int |
291 | _eina_crc(const char *data, int len, unsigned int seed, Eina_Bool start_stream) | 291 | _eina_crc(const char *data, int len, unsigned int seed, Eina_Bool start_stream) |
292 | { | 292 | { |
293 | unsigned int crc; | 293 | unsigned int crc; |
diff --git a/src/lib/eina/eina_debug.c b/src/lib/eina/eina_debug.c index c811c5fe2a..00e90ab995 100644 --- a/src/lib/eina/eina_debug.c +++ b/src/lib/eina/eina_debug.c | |||
@@ -142,7 +142,7 @@ static void _opcodes_register_all(Eina_Debug_Session *session); | |||
142 | #endif | 142 | #endif |
143 | static void _thread_start(Eina_Debug_Session *session); | 143 | static void _thread_start(Eina_Debug_Session *session); |
144 | 144 | ||
145 | EAPI int | 145 | EINA_API int |
146 | eina_debug_session_send(Eina_Debug_Session *session, int dest, int op, void *data, int size) | 146 | eina_debug_session_send(Eina_Debug_Session *session, int dest, int op, void *data, int size) |
147 | { | 147 | { |
148 | Eina_Debug_Packet_Header hdr; | 148 | Eina_Debug_Packet_Header hdr; |
@@ -262,13 +262,13 @@ end: | |||
262 | } | 262 | } |
263 | #endif | 263 | #endif |
264 | 264 | ||
265 | EAPI void | 265 | EINA_API void |
266 | eina_debug_disable() | 266 | eina_debug_disable() |
267 | { | 267 | { |
268 | _debug_disabled = EINA_TRUE; | 268 | _debug_disabled = EINA_TRUE; |
269 | } | 269 | } |
270 | 270 | ||
271 | EAPI void | 271 | EINA_API void |
272 | eina_debug_session_terminate(Eina_Debug_Session *session) | 272 | eina_debug_session_terminate(Eina_Debug_Session *session) |
273 | { | 273 | { |
274 | /* Close fd here so the thread terminates its own session by itself */ | 274 | /* Close fd here so the thread terminates its own session by itself */ |
@@ -287,7 +287,7 @@ eina_debug_session_terminate(Eina_Debug_Session *session) | |||
287 | } | 287 | } |
288 | } | 288 | } |
289 | 289 | ||
290 | EAPI void | 290 | EINA_API void |
291 | eina_debug_session_dispatch_override(Eina_Debug_Session *session, Eina_Debug_Dispatch_Cb disp_cb) | 291 | eina_debug_session_dispatch_override(Eina_Debug_Session *session, Eina_Debug_Dispatch_Cb disp_cb) |
292 | { | 292 | { |
293 | if (!session) return; | 293 | if (!session) return; |
@@ -295,7 +295,7 @@ eina_debug_session_dispatch_override(Eina_Debug_Session *session, Eina_Debug_Dis | |||
295 | session->dispatch_cb = disp_cb; | 295 | session->dispatch_cb = disp_cb; |
296 | } | 296 | } |
297 | 297 | ||
298 | EAPI Eina_Debug_Dispatch_Cb | 298 | EINA_API Eina_Debug_Dispatch_Cb |
299 | eina_debug_session_dispatch_get(Eina_Debug_Session *session) | 299 | eina_debug_session_dispatch_get(Eina_Debug_Session *session) |
300 | { | 300 | { |
301 | if (session) return session->dispatch_cb; | 301 | if (session) return session->dispatch_cb; |
@@ -462,7 +462,7 @@ _session_create(int fd) | |||
462 | return session; | 462 | return session; |
463 | } | 463 | } |
464 | 464 | ||
465 | EAPI Eina_Debug_Session * | 465 | EINA_API Eina_Debug_Session * |
466 | eina_debug_remote_connect(int port) | 466 | eina_debug_remote_connect(int port) |
467 | { | 467 | { |
468 | int fd; | 468 | int fd; |
@@ -492,7 +492,7 @@ err: | |||
492 | return NULL; | 492 | return NULL; |
493 | } | 493 | } |
494 | 494 | ||
495 | EAPI Eina_Debug_Session * | 495 | EINA_API Eina_Debug_Session * |
496 | eina_debug_local_connect(Eina_Bool is_master) | 496 | eina_debug_local_connect(Eina_Bool is_master) |
497 | { | 497 | { |
498 | #ifndef _WIN32 | 498 | #ifndef _WIN32 |
@@ -641,7 +641,7 @@ _thread_start(Eina_Debug_Session *session) | |||
641 | * - Pointer to ops: returned in the response to determine which opcodes have been added | 641 | * - Pointer to ops: returned in the response to determine which opcodes have been added |
642 | * - List of opcode names separated by \0 | 642 | * - List of opcode names separated by \0 |
643 | */ | 643 | */ |
644 | EAPI void | 644 | EINA_API void |
645 | eina_debug_opcodes_register(Eina_Debug_Session *session, const Eina_Debug_Opcode ops[], | 645 | eina_debug_opcodes_register(Eina_Debug_Session *session, const Eina_Debug_Opcode ops[], |
646 | Eina_Debug_Opcode_Status_Cb status_cb, void *data) | 646 | Eina_Debug_Opcode_Status_Cb status_cb, void *data) |
647 | { | 647 | { |
@@ -663,7 +663,7 @@ eina_debug_opcodes_register(Eina_Debug_Session *session, const Eina_Debug_Opcode | |||
663 | _opcodes_registration_send(session, info); | 663 | _opcodes_registration_send(session, info); |
664 | } | 664 | } |
665 | 665 | ||
666 | EAPI Eina_Bool | 666 | EINA_API Eina_Bool |
667 | eina_debug_dispatch(Eina_Debug_Session *session, void *buffer) | 667 | eina_debug_dispatch(Eina_Debug_Session *session, void *buffer) |
668 | { | 668 | { |
669 | Eina_Debug_Packet_Header *hdr = buffer; | 669 | Eina_Debug_Packet_Header *hdr = buffer; |
@@ -688,13 +688,13 @@ eina_debug_dispatch(Eina_Debug_Session *session, void *buffer) | |||
688 | return EINA_TRUE; | 688 | return EINA_TRUE; |
689 | } | 689 | } |
690 | 690 | ||
691 | EAPI void | 691 | EINA_API void |
692 | eina_debug_session_data_set(Eina_Debug_Session *session, void *data) | 692 | eina_debug_session_data_set(Eina_Debug_Session *session, void *data) |
693 | { | 693 | { |
694 | if (session) session->data = data; | 694 | if (session) session->data = data; |
695 | } | 695 | } |
696 | 696 | ||
697 | EAPI void * | 697 | EINA_API void * |
698 | eina_debug_session_data_get(Eina_Debug_Session *session) | 698 | eina_debug_session_data_get(Eina_Debug_Session *session) |
699 | { | 699 | { |
700 | if (session) return session->data; | 700 | if (session) return session->data; |
@@ -750,7 +750,7 @@ eina_debug_shutdown(void) | |||
750 | return EINA_TRUE; | 750 | return EINA_TRUE; |
751 | } | 751 | } |
752 | 752 | ||
753 | EAPI void | 753 | EINA_API void |
754 | eina_debug_fork_reset(void) | 754 | eina_debug_fork_reset(void) |
755 | { | 755 | { |
756 | extern Eina_Bool fork_resetting; | 756 | extern Eina_Bool fork_resetting; |
diff --git a/src/lib/eina/eina_debug.h b/src/lib/eina/eina_debug.h index dbc36caf5d..a19d04d83a 100644 --- a/src/lib/eina/eina_debug.h +++ b/src/lib/eina/eina_debug.h | |||
@@ -162,7 +162,7 @@ typedef struct | |||
162 | * of them. | 162 | * of them. |
163 | * Need to be invoked before eina_init. Otherwise it won't have any effect. | 163 | * Need to be invoked before eina_init. Otherwise it won't have any effect. |
164 | */ | 164 | */ |
165 | EAPI void eina_debug_disable(void); | 165 | EINA_API void eina_debug_disable(void); |
166 | 166 | ||
167 | /** | 167 | /** |
168 | * @brief Connect to the local daemon | 168 | * @brief Connect to the local daemon |
@@ -171,7 +171,7 @@ EAPI void eina_debug_disable(void); | |||
171 | * | 171 | * |
172 | * @return The session on success or NULL otherwise. | 172 | * @return The session on success or NULL otherwise. |
173 | */ | 173 | */ |
174 | EAPI Eina_Debug_Session *eina_debug_local_connect(Eina_Bool is_master); | 174 | EINA_API Eina_Debug_Session *eina_debug_local_connect(Eina_Bool is_master); |
175 | 175 | ||
176 | /** | 176 | /** |
177 | * @brief Connect to remote daemon | 177 | * @brief Connect to remote daemon |
@@ -182,14 +182,14 @@ EAPI Eina_Debug_Session *eina_debug_local_connect(Eina_Bool is_master); | |||
182 | * | 182 | * |
183 | * @return The session on success or NULL otherwise. | 183 | * @return The session on success or NULL otherwise. |
184 | */ | 184 | */ |
185 | EAPI Eina_Debug_Session *eina_debug_remote_connect(int port); | 185 | EINA_API Eina_Debug_Session *eina_debug_remote_connect(int port); |
186 | 186 | ||
187 | /** | 187 | /** |
188 | * @brief Terminate the session | 188 | * @brief Terminate the session |
189 | * | 189 | * |
190 | * @param[in,out] session the session to terminate | 190 | * @param[in,out] session the session to terminate |
191 | */ | 191 | */ |
192 | EAPI void eina_debug_session_terminate(Eina_Debug_Session *session); | 192 | EINA_API void eina_debug_session_terminate(Eina_Debug_Session *session); |
193 | 193 | ||
194 | /** | 194 | /** |
195 | * @brief Override the dispatcher of a specific session | 195 | * @brief Override the dispatcher of a specific session |
@@ -201,7 +201,7 @@ EAPI void eina_debug_session_terminate(Eina_Debug_Session *session); | |||
201 | * @param[in,out] session the session | 201 | * @param[in,out] session the session |
202 | * @param[in] disp_cb the new dispatcher for the given session | 202 | * @param[in] disp_cb the new dispatcher for the given session |
203 | */ | 203 | */ |
204 | EAPI void eina_debug_session_dispatch_override(Eina_Debug_Session *session, Eina_Debug_Dispatch_Cb disp_cb); | 204 | EINA_API void eina_debug_session_dispatch_override(Eina_Debug_Session *session, Eina_Debug_Dispatch_Cb disp_cb); |
205 | 205 | ||
206 | /** | 206 | /** |
207 | * @brief Get the dispatcher of a specific session | 207 | * @brief Get the dispatcher of a specific session |
@@ -210,7 +210,7 @@ EAPI void eina_debug_session_dispatch_override(Eina_Debug_Session *session, Eina | |||
210 | * | 210 | * |
211 | * @return The session dispatcher. | 211 | * @return The session dispatcher. |
212 | */ | 212 | */ |
213 | EAPI Eina_Debug_Dispatch_Cb eina_debug_session_dispatch_get(Eina_Debug_Session *session); | 213 | EINA_API Eina_Debug_Dispatch_Cb eina_debug_session_dispatch_get(Eina_Debug_Session *session); |
214 | 214 | ||
215 | /** | 215 | /** |
216 | * @brief Dispatch a given packet according to its header. | 216 | * @brief Dispatch a given packet according to its header. |
@@ -224,7 +224,7 @@ EAPI Eina_Debug_Dispatch_Cb eina_debug_session_dispatch_get(Eina_Debug_Session * | |||
224 | * | 224 | * |
225 | * @return True on success, false if the connection seems compromised. | 225 | * @return True on success, false if the connection seems compromised. |
226 | */ | 226 | */ |
227 | EAPI Eina_Bool eina_debug_dispatch(Eina_Debug_Session *session, void *buffer); | 227 | EINA_API Eina_Bool eina_debug_dispatch(Eina_Debug_Session *session, void *buffer); |
228 | 228 | ||
229 | /** | 229 | /** |
230 | * @brief Set data to a session | 230 | * @brief Set data to a session |
@@ -232,7 +232,7 @@ EAPI Eina_Bool eina_debug_dispatch(Eina_Debug_Session *session, void *buffer); | |||
232 | * @param[in,out] session the session | 232 | * @param[in,out] session the session |
233 | * @param[in] data the data to set | 233 | * @param[in] data the data to set |
234 | */ | 234 | */ |
235 | EAPI void eina_debug_session_data_set(Eina_Debug_Session *session, void *data); | 235 | EINA_API void eina_debug_session_data_set(Eina_Debug_Session *session, void *data); |
236 | 236 | ||
237 | /** | 237 | /** |
238 | * @brief Get the data attached to a session | 238 | * @brief Get the data attached to a session |
@@ -241,7 +241,7 @@ EAPI void eina_debug_session_data_set(Eina_Debug_Session *session, void *data); | |||
241 | * | 241 | * |
242 | * @return The data of the session. | 242 | * @return The data of the session. |
243 | */ | 243 | */ |
244 | EAPI void *eina_debug_session_data_get(Eina_Debug_Session *session); | 244 | EINA_API void *eina_debug_session_data_get(Eina_Debug_Session *session); |
245 | 245 | ||
246 | /** | 246 | /** |
247 | * @brief Register opcodes to a session | 247 | * @brief Register opcodes to a session |
@@ -257,7 +257,7 @@ EAPI void *eina_debug_session_data_get(Eina_Debug_Session *session); | |||
257 | * @param[in] status_cb a function to call when the opcodes are received | 257 | * @param[in] status_cb a function to call when the opcodes are received |
258 | * @param[in] status_data the data to give to status_cb | 258 | * @param[in] status_data the data to give to status_cb |
259 | */ | 259 | */ |
260 | EAPI void eina_debug_opcodes_register(Eina_Debug_Session *session, | 260 | EINA_API void eina_debug_opcodes_register(Eina_Debug_Session *session, |
261 | const Eina_Debug_Opcode ops[], | 261 | const Eina_Debug_Opcode ops[], |
262 | Eina_Debug_Opcode_Status_Cb status_cb, void *status_data); | 262 | Eina_Debug_Opcode_Status_Cb status_cb, void *status_data); |
263 | 263 | ||
@@ -274,7 +274,7 @@ EAPI void eina_debug_opcodes_register(Eina_Debug_Session *session, | |||
274 | * | 274 | * |
275 | * @return The number of sent bytes. | 275 | * @return The number of sent bytes. |
276 | */ | 276 | */ |
277 | EAPI int eina_debug_session_send(Eina_Debug_Session *session, int dest_id, int op, void *data, int size); | 277 | EINA_API int eina_debug_session_send(Eina_Debug_Session *session, int dest_id, int op, void *data, int size); |
278 | 278 | ||
279 | /** | 279 | /** |
280 | * @brief Add a timer | 280 | * @brief Add a timer |
@@ -285,7 +285,7 @@ EAPI int eina_debug_session_send(Eina_Debug_Session *session, int dest_id, int o | |||
285 | * | 285 | * |
286 | * @return The timer handle, NULL on error. | 286 | * @return The timer handle, NULL on error. |
287 | */ | 287 | */ |
288 | EAPI Eina_Debug_Timer *eina_debug_timer_add(unsigned int timeout_ms, Eina_Debug_Timer_Cb cb, void *data); | 288 | EINA_API Eina_Debug_Timer *eina_debug_timer_add(unsigned int timeout_ms, Eina_Debug_Timer_Cb cb, void *data); |
289 | 289 | ||
290 | /** | 290 | /** |
291 | * @brief Delete a timer | 291 | * @brief Delete a timer |
@@ -295,7 +295,7 @@ EAPI Eina_Debug_Timer *eina_debug_timer_add(unsigned int timeout_ms, Eina_Debug_ | |||
295 | * If the timer reaches the end and has not be renewed, trying to delete it will lead to a crash, as | 295 | * If the timer reaches the end and has not be renewed, trying to delete it will lead to a crash, as |
296 | * it has already been deleted internally. | 296 | * it has already been deleted internally. |
297 | */ | 297 | */ |
298 | EAPI void eina_debug_timer_del(Eina_Debug_Timer *timer); | 298 | EINA_API void eina_debug_timer_del(Eina_Debug_Timer *timer); |
299 | 299 | ||
300 | /** | 300 | /** |
301 | * @brief Reset the eina debug system after forking | 301 | * @brief Reset the eina debug system after forking |
@@ -303,7 +303,7 @@ EAPI void eina_debug_timer_del(Eina_Debug_Timer *timer); | |||
303 | * Call this any time the application forks | 303 | * Call this any time the application forks |
304 | * @since 1.21 | 304 | * @since 1.21 |
305 | * */ | 305 | * */ |
306 | EAPI void eina_debug_fork_reset(void); | 306 | EINA_API void eina_debug_fork_reset(void); |
307 | /** | 307 | /** |
308 | * @} | 308 | * @} |
309 | */ | 309 | */ |
diff --git a/src/lib/eina/eina_debug_timer.c b/src/lib/eina/eina_debug_timer.c index 8d03c0e57b..07cf6b1ef4 100644 --- a/src/lib/eina/eina_debug_timer.c +++ b/src/lib/eina/eina_debug_timer.c | |||
@@ -148,7 +148,7 @@ _monitor(void *_data EINA_UNUSED) | |||
148 | return NULL; | 148 | return NULL; |
149 | } | 149 | } |
150 | 150 | ||
151 | EAPI Eina_Debug_Timer * | 151 | EINA_API Eina_Debug_Timer * |
152 | eina_debug_timer_add(unsigned int timeout_ms, Eina_Debug_Timer_Cb cb, void *data) | 152 | eina_debug_timer_add(unsigned int timeout_ms, Eina_Debug_Timer_Cb cb, void *data) |
153 | { | 153 | { |
154 | if (!cb || !timeout_ms) return NULL; | 154 | if (!cb || !timeout_ms) return NULL; |
@@ -193,7 +193,7 @@ eina_debug_timer_add(unsigned int timeout_ms, Eina_Debug_Timer_Cb cb, void *data | |||
193 | return t; | 193 | return t; |
194 | } | 194 | } |
195 | 195 | ||
196 | EAPI void | 196 | EINA_API void |
197 | eina_debug_timer_del(Eina_Debug_Timer *t) | 197 | eina_debug_timer_del(Eina_Debug_Timer *t) |
198 | { | 198 | { |
199 | eina_spinlock_take(&_lock); | 199 | eina_spinlock_take(&_lock); |
diff --git a/src/lib/eina/eina_error.c b/src/lib/eina/eina_error.c index b9f05a5a9d..43851728e5 100644 --- a/src/lib/eina/eina_error.c +++ b/src/lib/eina/eina_error.c | |||
@@ -138,7 +138,7 @@ static inline int strerror_r(int errnum, char *buf, size_t buflen) | |||
138 | * @cond LOCAL | 138 | * @cond LOCAL |
139 | */ | 139 | */ |
140 | 140 | ||
141 | EAPI Eina_Error EINA_ERROR_OUT_OF_MEMORY = ENOMEM; | 141 | EINA_API Eina_Error EINA_ERROR_OUT_OF_MEMORY = ENOMEM; |
142 | 142 | ||
143 | /** | 143 | /** |
144 | * @endcond | 144 | * @endcond |
@@ -225,7 +225,7 @@ eina_error_shutdown(void) | |||
225 | * API * | 225 | * API * |
226 | *============================================================================*/ | 226 | *============================================================================*/ |
227 | 227 | ||
228 | EAPI Eina_Error | 228 | EINA_API Eina_Error |
229 | eina_error_msg_register(const char *msg) | 229 | eina_error_msg_register(const char *msg) |
230 | { | 230 | { |
231 | Eina_Error_Message *eem; | 231 | Eina_Error_Message *eem; |
@@ -247,7 +247,7 @@ eina_error_msg_register(const char *msg) | |||
247 | return EINA_ERROR_FROM_INDEX(_eina_errors_count); /* identifier = index + 1 (== _count). */ | 247 | return EINA_ERROR_FROM_INDEX(_eina_errors_count); /* identifier = index + 1 (== _count). */ |
248 | } | 248 | } |
249 | 249 | ||
250 | EAPI Eina_Error | 250 | EINA_API Eina_Error |
251 | eina_error_msg_static_register(const char *msg) | 251 | eina_error_msg_static_register(const char *msg) |
252 | { | 252 | { |
253 | Eina_Error_Message *eem; | 253 | Eina_Error_Message *eem; |
@@ -263,7 +263,7 @@ eina_error_msg_static_register(const char *msg) | |||
263 | return EINA_ERROR_FROM_INDEX(_eina_errors_count); /* identifier = index + 1 (== _count). */ | 263 | return EINA_ERROR_FROM_INDEX(_eina_errors_count); /* identifier = index + 1 (== _count). */ |
264 | } | 264 | } |
265 | 265 | ||
266 | EAPI Eina_Bool | 266 | EINA_API Eina_Bool |
267 | eina_error_msg_modify(Eina_Error error, const char *msg) | 267 | eina_error_msg_modify(Eina_Error error, const char *msg) |
268 | { | 268 | { |
269 | EINA_SAFETY_ON_NULL_RETURN_VAL(msg, EINA_FALSE); | 269 | EINA_SAFETY_ON_NULL_RETURN_VAL(msg, EINA_FALSE); |
@@ -291,7 +291,7 @@ eina_error_msg_modify(Eina_Error error, const char *msg) | |||
291 | return EINA_TRUE; | 291 | return EINA_TRUE; |
292 | } | 292 | } |
293 | 293 | ||
294 | EAPI const char * | 294 | EINA_API const char * |
295 | eina_error_msg_get(Eina_Error error) | 295 | eina_error_msg_get(Eina_Error error) |
296 | { | 296 | { |
297 | if (!EINA_ERROR_REGISTERED_CHECK(error)) | 297 | if (!EINA_ERROR_REGISTERED_CHECK(error)) |
@@ -385,7 +385,7 @@ eina_error_msg_get(Eina_Error error) | |||
385 | return _eina_errors[error - 1].string; | 385 | return _eina_errors[error - 1].string; |
386 | } | 386 | } |
387 | 387 | ||
388 | EAPI Eina_Error | 388 | EINA_API Eina_Error |
389 | eina_error_get(void) | 389 | eina_error_get(void) |
390 | { | 390 | { |
391 | if (eina_main_loop_is()) | 391 | if (eina_main_loop_is()) |
@@ -394,7 +394,7 @@ eina_error_get(void) | |||
394 | return (Eina_Error)(uintptr_t) eina_tls_get(_eina_last_key); | 394 | return (Eina_Error)(uintptr_t) eina_tls_get(_eina_last_key); |
395 | } | 395 | } |
396 | 396 | ||
397 | EAPI void | 397 | EINA_API void |
398 | eina_error_set(Eina_Error err) | 398 | eina_error_set(Eina_Error err) |
399 | { | 399 | { |
400 | if (eina_main_loop_is()) | 400 | if (eina_main_loop_is()) |
@@ -403,7 +403,7 @@ eina_error_set(Eina_Error err) | |||
403 | eina_tls_set(_eina_last_key, (void*)(uintptr_t) err); | 403 | eina_tls_set(_eina_last_key, (void*)(uintptr_t) err); |
404 | } | 404 | } |
405 | 405 | ||
406 | EAPI Eina_Error | 406 | EINA_API Eina_Error |
407 | eina_error_find(const char *msg) | 407 | eina_error_find(const char *msg) |
408 | { | 408 | { |
409 | size_t i; | 409 | size_t i; |
diff --git a/src/lib/eina/eina_error.h b/src/lib/eina/eina_error.h index ba27bc67bc..3203924515 100644 --- a/src/lib/eina/eina_error.h +++ b/src/lib/eina/eina_error.h | |||
@@ -113,7 +113,7 @@ typedef Eina_Bool Eina_Success_Flag; | |||
113 | * | 113 | * |
114 | * @deprecated since 1.19, same as @c ENOMEM from @c errno.h | 114 | * @deprecated since 1.19, same as @c ENOMEM from @c errno.h |
115 | */ | 115 | */ |
116 | EAPI extern Eina_Error EINA_ERROR_OUT_OF_MEMORY EINA_DEPRECATED; /* use ENOMEM */ | 116 | EINA_API extern Eina_Error EINA_ERROR_OUT_OF_MEMORY EINA_DEPRECATED; /* use ENOMEM */ |
117 | 117 | ||
118 | /** | 118 | /** |
119 | * @brief Registers a new error type. | 119 | * @brief Registers a new error type. |
@@ -131,7 +131,7 @@ EAPI extern Eina_Error EINA_ERROR_OUT_OF_MEMORY EINA_DEPRECATED; /* use ENOMEM * | |||
131 | * | 131 | * |
132 | * @see eina_error_msg_static_register() | 132 | * @see eina_error_msg_static_register() |
133 | */ | 133 | */ |
134 | EAPI Eina_Error eina_error_msg_register(const char *msg) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; | 134 | EINA_API Eina_Error eina_error_msg_register(const char *msg) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; |
135 | 135 | ||
136 | /** | 136 | /** |
137 | * @brief Registers a new error type, statically allocated message. | 137 | * @brief Registers a new error type, statically allocated message. |
@@ -150,7 +150,7 @@ EAPI Eina_Error eina_error_msg_register(const char *msg) EINA_ARG_NONNULL(1) EI | |||
150 | * | 150 | * |
151 | * @see eina_error_msg_register() | 151 | * @see eina_error_msg_register() |
152 | */ | 152 | */ |
153 | EAPI Eina_Error eina_error_msg_static_register(const char *msg) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; | 153 | EINA_API Eina_Error eina_error_msg_static_register(const char *msg) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; |
154 | 154 | ||
155 | /** | 155 | /** |
156 | * @brief Changes the message of an already registered message. | 156 | * @brief Changes the message of an already registered message. |
@@ -171,7 +171,7 @@ EAPI Eina_Error eina_error_msg_static_register(const char *msg) EINA_ARG_NONNUL | |||
171 | * | 171 | * |
172 | * @see eina_error_msg_register() | 172 | * @see eina_error_msg_register() |
173 | */ | 173 | */ |
174 | EAPI Eina_Bool eina_error_msg_modify(Eina_Error error, | 174 | EINA_API Eina_Bool eina_error_msg_modify(Eina_Error error, |
175 | const char *msg) EINA_ARG_NONNULL(2); | 175 | const char *msg) EINA_ARG_NONNULL(2); |
176 | 176 | ||
177 | /** | 177 | /** |
@@ -183,7 +183,7 @@ EAPI Eina_Bool eina_error_msg_modify(Eina_Error error, | |||
183 | * | 183 | * |
184 | * @note This function is thread safe @since 1.10, but slower to use. | 184 | * @note This function is thread safe @since 1.10, but slower to use. |
185 | */ | 185 | */ |
186 | EAPI Eina_Error eina_error_get(void); | 186 | EINA_API Eina_Error eina_error_get(void); |
187 | 187 | ||
188 | /** | 188 | /** |
189 | * @brief Sets the last error. | 189 | * @brief Sets the last error. |
@@ -197,7 +197,7 @@ EAPI Eina_Error eina_error_get(void); | |||
197 | * | 197 | * |
198 | * @note This function is thread safe @since 1.10, but slower to use. | 198 | * @note This function is thread safe @since 1.10, but slower to use. |
199 | */ | 199 | */ |
200 | EAPI void eina_error_set(Eina_Error err); | 200 | EINA_API void eina_error_set(Eina_Error err); |
201 | 201 | ||
202 | /** | 202 | /** |
203 | * @brief Returns the description of the given error number. | 203 | * @brief Returns the description of the given error number. |
@@ -208,7 +208,7 @@ EAPI void eina_error_set(Eina_Error err); | |||
208 | * @return The description of the error | 208 | * @return The description of the error |
209 | * | 209 | * |
210 | */ | 210 | */ |
211 | EAPI const char *eina_error_msg_get(Eina_Error error) EINA_PURE; | 211 | EINA_API const char *eina_error_msg_get(Eina_Error error) EINA_PURE; |
212 | 212 | ||
213 | /** | 213 | /** |
214 | * @brief Finds the #Eina_Error corresponding to a message string. | 214 | * @brief Finds the #Eina_Error corresponding to a message string. |
@@ -223,7 +223,7 @@ EAPI const char *eina_error_msg_get(Eina_Error error) EINA_PURE; | |||
223 | * eina_error_msg_static_register() or modified with | 223 | * eina_error_msg_static_register() or modified with |
224 | * eina_error_msg_modify(). | 224 | * eina_error_msg_modify(). |
225 | */ | 225 | */ |
226 | EAPI Eina_Error eina_error_find(const char *msg) EINA_ARG_NONNULL(1) EINA_PURE; | 226 | EINA_API Eina_Error eina_error_find(const char *msg) EINA_ARG_NONNULL(1) EINA_PURE; |
227 | 227 | ||
228 | /** | 228 | /** |
229 | * @} | 229 | * @} |
diff --git a/src/lib/eina/eina_evlog.c b/src/lib/eina/eina_evlog.c index eb32dfc27b..c0fe64fe22 100644 --- a/src/lib/eina/eina_evlog.c +++ b/src/lib/eina/eina_evlog.c | |||
@@ -150,7 +150,7 @@ push_buf(Eina_Evlog_Buf *b, unsigned int size) | |||
150 | return ptr; | 150 | return ptr; |
151 | } | 151 | } |
152 | 152 | ||
153 | EAPI void | 153 | EINA_API void |
154 | eina_evlog(const char *event, void *obj, double srctime, const char *detail) | 154 | eina_evlog(const char *event, void *obj, double srctime, const char *detail) |
155 | { | 155 | { |
156 | Eina_Evlog_Item *item; | 156 | Eina_Evlog_Item *item; |
@@ -186,7 +186,7 @@ eina_evlog(const char *event, void *obj, double srctime, const char *detail) | |||
186 | eina_spinlock_release(&_evlog_lock); | 186 | eina_spinlock_release(&_evlog_lock); |
187 | } | 187 | } |
188 | 188 | ||
189 | EAPI Eina_Evlog_Buf * | 189 | EINA_API Eina_Evlog_Buf * |
190 | eina_evlog_steal(void) | 190 | eina_evlog_steal(void) |
191 | { | 191 | { |
192 | Eina_Evlog_Buf *stolen = NULL; | 192 | Eina_Evlog_Buf *stolen = NULL; |
@@ -210,7 +210,7 @@ eina_evlog_steal(void) | |||
210 | return stolen; | 210 | return stolen; |
211 | } | 211 | } |
212 | 212 | ||
213 | EAPI void | 213 | EINA_API void |
214 | eina_evlog_start(void) | 214 | eina_evlog_start(void) |
215 | { | 215 | { |
216 | eina_spinlock_take(&_evlog_lock); | 216 | eina_spinlock_take(&_evlog_lock); |
@@ -224,7 +224,7 @@ eina_evlog_start(void) | |||
224 | eina_spinlock_release(&_evlog_lock); | 224 | eina_spinlock_release(&_evlog_lock); |
225 | } | 225 | } |
226 | 226 | ||
227 | EAPI void | 227 | EINA_API void |
228 | eina_evlog_stop(void) | 228 | eina_evlog_stop(void) |
229 | { | 229 | { |
230 | eina_spinlock_take(&_evlog_lock); | 230 | eina_spinlock_take(&_evlog_lock); |
diff --git a/src/lib/eina/eina_evlog.h b/src/lib/eina/eina_evlog.h index 6843602ff7..4c6a4255db 100644 --- a/src/lib/eina/eina_evlog.h +++ b/src/lib/eina/eina_evlog.h | |||
@@ -113,7 +113,7 @@ struct _Eina_Evlog_Buf | |||
113 | * | 113 | * |
114 | * @since 1.15 | 114 | * @since 1.15 |
115 | */ | 115 | */ |
116 | EAPI void | 116 | EINA_API void |
117 | eina_evlog(const char *event, void *obj, double srctime, const char *detail); | 117 | eina_evlog(const char *event, void *obj, double srctime, const char *detail); |
118 | 118 | ||
119 | /** | 119 | /** |
@@ -126,7 +126,7 @@ eina_evlog(const char *event, void *obj, double srctime, const char *detail); | |||
126 | * | 126 | * |
127 | * @since 1.15 | 127 | * @since 1.15 |
128 | */ | 128 | */ |
129 | EAPI Eina_Evlog_Buf * | 129 | EINA_API Eina_Evlog_Buf * |
130 | eina_evlog_steal(void); | 130 | eina_evlog_steal(void); |
131 | 131 | ||
132 | /** | 132 | /** |
@@ -134,7 +134,7 @@ eina_evlog_steal(void); | |||
134 | * | 134 | * |
135 | * @since 1.15 | 135 | * @since 1.15 |
136 | */ | 136 | */ |
137 | EAPI void | 137 | EINA_API void |
138 | eina_evlog_start(void); | 138 | eina_evlog_start(void); |
139 | 139 | ||
140 | /** | 140 | /** |
@@ -145,7 +145,7 @@ eina_evlog_start(void); | |||
145 | * | 145 | * |
146 | * @since 1.15 | 146 | * @since 1.15 |
147 | */ | 147 | */ |
148 | EAPI void | 148 | EINA_API void |
149 | eina_evlog_stop(void); | 149 | eina_evlog_stop(void); |
150 | 150 | ||
151 | /** | 151 | /** |
diff --git a/src/lib/eina/eina_file.h b/src/lib/eina/eina_file.h index 7650884367..c7e5b2b590 100644 --- a/src/lib/eina/eina_file.h +++ b/src/lib/eina/eina_file.h | |||
@@ -264,7 +264,7 @@ struct _Eina_File_Line | |||
264 | * @param[in] data The data to pass to the callback | 264 | * @param[in] data The data to pass to the callback |
265 | * @return #EINA_TRUE on success, otherwise #EINA_FALSE | 265 | * @return #EINA_TRUE on success, otherwise #EINA_FALSE |
266 | */ | 266 | */ |
267 | EAPI Eina_Bool eina_file_dir_list(const char *dir, | 267 | EINA_API Eina_Bool eina_file_dir_list(const char *dir, |
268 | Eina_Bool recursive, | 268 | Eina_Bool recursive, |
269 | Eina_File_Dir_List_Cb cb, | 269 | Eina_File_Dir_List_Cb cb, |
270 | void *data) EINA_ARG_NONNULL(1, 3); | 270 | void *data) EINA_ARG_NONNULL(1, 3); |
@@ -280,7 +280,7 @@ EAPI Eina_Bool eina_file_dir_list(const char *dir, | |||
280 | * @return An array of the parts of the path to split | 280 | * @return An array of the parts of the path to split |
281 | * | 281 | * |
282 | */ | 282 | */ |
283 | EAPI Eina_Array *eina_file_split(char *path) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; | 283 | EINA_API Eina_Array *eina_file_split(char *path) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; |
284 | 284 | ||
285 | /** | 285 | /** |
286 | * @brief Gets an iterator to list the content of a directory. | 286 | * @brief Gets an iterator to list the content of a directory. |
@@ -300,7 +300,7 @@ EAPI Eina_Array *eina_file_split(char *path) EINA_WARN_UNUSED_RESULT EINA_ARG | |||
300 | * | 300 | * |
301 | * @see eina_file_direct_ls() | 301 | * @see eina_file_direct_ls() |
302 | */ | 302 | */ |
303 | EAPI Eina_Iterator *eina_file_ls(const char *dir) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; | 303 | EINA_API Eina_Iterator *eina_file_ls(const char *dir) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; |
304 | 304 | ||
305 | /** | 305 | /** |
306 | * @brief Gets an iterator to list the content of a directory, with direct | 306 | * @brief Gets an iterator to list the content of a directory, with direct |
@@ -327,7 +327,7 @@ EAPI Eina_Iterator *eina_file_ls(const char *dir) EINA_WARN_UNUSED_RESULT EINA_A | |||
327 | * | 327 | * |
328 | * @see eina_file_direct_ls() | 328 | * @see eina_file_direct_ls() |
329 | */ | 329 | */ |
330 | EAPI Eina_Iterator *eina_file_stat_ls(const char *dir) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; | 330 | EINA_API Eina_Iterator *eina_file_stat_ls(const char *dir) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; |
331 | 331 | ||
332 | /** | 332 | /** |
333 | * @brief Uses information provided by #Eina_Iterator of eina_file_stat_ls() or eina_file_direct_ls() | 333 | * @brief Uses information provided by #Eina_Iterator of eina_file_stat_ls() or eina_file_direct_ls() |
@@ -345,7 +345,7 @@ EAPI Eina_Iterator *eina_file_stat_ls(const char *dir) EINA_WARN_UNUSED_RESULT E | |||
345 | * | 345 | * |
346 | * @since 1.2 | 346 | * @since 1.2 |
347 | */ | 347 | */ |
348 | EAPI int eina_file_statat(void *container, Eina_File_Direct_Info *info, Eina_Stat *buf) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2, 3); | 348 | EINA_API int eina_file_statat(void *container, Eina_File_Direct_Info *info, Eina_Stat *buf) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2, 3); |
349 | 349 | ||
350 | /** | 350 | /** |
351 | * @brief Close all file descriptors that are open at or above the given fd | 351 | * @brief Close all file descriptors that are open at or above the given fd |
@@ -362,7 +362,7 @@ EAPI int eina_file_statat(void *container, Eina_File_Direct_Info *info, Eina_Sta | |||
362 | * | 362 | * |
363 | * @since 1.24 | 363 | * @since 1.24 |
364 | */ | 364 | */ |
365 | EAPI void eina_file_close_from(int fd, int *except_fd); | 365 | EINA_API void eina_file_close_from(int fd, int *except_fd); |
366 | 366 | ||
367 | /** | 367 | /** |
368 | * @brief Generates and creates a uniquely named temporary file from a template name. | 368 | * @brief Generates and creates a uniquely named temporary file from a template name. |
@@ -393,7 +393,7 @@ EAPI void eina_file_close_from(int fd, int *except_fd); | |||
393 | * @see eina_file_mkdtemp() | 393 | * @see eina_file_mkdtemp() |
394 | * @since 1.8 | 394 | * @since 1.8 |
395 | */ | 395 | */ |
396 | EAPI int eina_file_mkstemp(const char *templatename, Eina_Tmpstr **path) EINA_ARG_NONNULL(1); | 396 | EINA_API int eina_file_mkstemp(const char *templatename, Eina_Tmpstr **path) EINA_ARG_NONNULL(1); |
397 | 397 | ||
398 | /** | 398 | /** |
399 | * @brief Generates and creates a uniquely named temporary directory from a template name. | 399 | * @brief Generates and creates a uniquely named temporary directory from a template name. |
@@ -417,7 +417,7 @@ EAPI int eina_file_mkstemp(const char *templatename, Eina_Tmpstr **path) EINA_AR | |||
417 | * @see eina_file_mkstemp() | 417 | * @see eina_file_mkstemp() |
418 | * @since 1.8 | 418 | * @since 1.8 |
419 | */ | 419 | */ |
420 | EAPI Eina_Bool eina_file_mkdtemp(const char *templatename, Eina_Tmpstr **path) EINA_ARG_NONNULL(1,2); | 420 | EINA_API Eina_Bool eina_file_mkdtemp(const char *templatename, Eina_Tmpstr **path) EINA_ARG_NONNULL(1,2); |
421 | 421 | ||
422 | /** | 422 | /** |
423 | * @brief Gets an iterator to list the content of a directory, with direct | 423 | * @brief Gets an iterator to list the content of a directory, with direct |
@@ -446,7 +446,7 @@ EAPI Eina_Bool eina_file_mkdtemp(const char *templatename, Eina_Tmpstr **path) E | |||
446 | * | 446 | * |
447 | * @see eina_file_ls() | 447 | * @see eina_file_ls() |
448 | */ | 448 | */ |
449 | EAPI Eina_Iterator *eina_file_direct_ls(const char *dir) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; | 449 | EINA_API Eina_Iterator *eina_file_direct_ls(const char *dir) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; |
450 | 450 | ||
451 | /** | 451 | /** |
452 | * @brief Sanitizes the file path. | 452 | * @brief Sanitizes the file path. |
@@ -460,7 +460,7 @@ EAPI Eina_Iterator *eina_file_direct_ls(const char *dir) EINA_WARN_UNUSED_RESULT | |||
460 | * | 460 | * |
461 | * @since 1.1 | 461 | * @since 1.1 |
462 | */ | 462 | */ |
463 | EAPI char *eina_file_path_sanitize(const char *path); | 463 | EINA_API char *eina_file_path_sanitize(const char *path); |
464 | 464 | ||
465 | /** | 465 | /** |
466 | * @typedef Eina_File_Copy_Progress | 466 | * @typedef Eina_File_Copy_Progress |
@@ -497,7 +497,7 @@ typedef enum { | |||
497 | * | 497 | * |
498 | * @note During the progress it may call back @p cb with the progress summary. | 498 | * @note During the progress it may call back @p cb with the progress summary. |
499 | */ | 499 | */ |
500 | EAPI Eina_Bool eina_file_copy(const char *src, const char *dst, Eina_File_Copy_Flags flags, Eina_File_Copy_Progress cb, const void *cb_data) EINA_ARG_NONNULL(1, 2); | 500 | EINA_API Eina_Bool eina_file_copy(const char *src, const char *dst, Eina_File_Copy_Flags flags, Eina_File_Copy_Progress cb, const void *cb_data) EINA_ARG_NONNULL(1, 2); |
501 | 501 | ||
502 | /** | 502 | /** |
503 | * @brief Gets a read-only handler to a file. | 503 | * @brief Gets a read-only handler to a file. |
@@ -512,7 +512,7 @@ EAPI Eina_Bool eina_file_copy(const char *src, const char *dst, Eina_File_Copy_F | |||
512 | * | 512 | * |
513 | * @since 1.1 | 513 | * @since 1.1 |
514 | */ | 514 | */ |
515 | EAPI Eina_File *eina_file_open(const char *name, Eina_Bool shared) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; | 515 | EINA_API Eina_File *eina_file_open(const char *name, Eina_Bool shared) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; |
516 | 516 | ||
517 | /** | 517 | /** |
518 | * @brief Creates a virtual file from a memory pointer. | 518 | * @brief Creates a virtual file from a memory pointer. |
@@ -525,7 +525,7 @@ EAPI Eina_File *eina_file_open(const char *name, Eina_Bool shared) EINA_WARN_UNU | |||
525 | * | 525 | * |
526 | * @since 1.8 | 526 | * @since 1.8 |
527 | */ | 527 | */ |
528 | EAPI Eina_File * | 528 | EINA_API Eina_File * |
529 | eina_file_virtualize(const char *virtual_name, const void *data, unsigned long long length, Eina_Bool copy) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | 529 | eina_file_virtualize(const char *virtual_name, const void *data, unsigned long long length, Eina_Bool copy) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); |
530 | 530 | ||
531 | /** | 531 | /** |
@@ -536,7 +536,7 @@ eina_file_virtualize(const char *virtual_name, const void *data, unsigned long l | |||
536 | * | 536 | * |
537 | * @since 1.8 | 537 | * @since 1.8 |
538 | */ | 538 | */ |
539 | EAPI Eina_Bool | 539 | EINA_API Eina_Bool |
540 | eina_file_virtual(Eina_File *file) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | 540 | eina_file_virtual(Eina_File *file) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); |
541 | 541 | ||
542 | /** | 542 | /** |
@@ -549,7 +549,7 @@ eina_file_virtual(Eina_File *file) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | |||
549 | * | 549 | * |
550 | * @since 1.8 | 550 | * @since 1.8 |
551 | */ | 551 | */ |
552 | EAPI Eina_Bool eina_file_refresh(Eina_File *file); | 552 | EINA_API Eina_Bool eina_file_refresh(Eina_File *file); |
553 | 553 | ||
554 | /** | 554 | /** |
555 | * @brief Duplicates a read-only handler of a previously open file. | 555 | * @brief Duplicates a read-only handler of a previously open file. |
@@ -561,7 +561,7 @@ EAPI Eina_Bool eina_file_refresh(Eina_File *file); | |||
561 | * | 561 | * |
562 | * @since 1.8 | 562 | * @since 1.8 |
563 | */ | 563 | */ |
564 | EAPI Eina_File * eina_file_dup(const Eina_File *file); | 564 | EINA_API Eina_File * eina_file_dup(const Eina_File *file); |
565 | 565 | ||
566 | /** | 566 | /** |
567 | * @brief Unrefs the file handler. | 567 | * @brief Unrefs the file handler. |
@@ -571,7 +571,7 @@ EAPI Eina_File * eina_file_dup(const Eina_File *file); | |||
571 | * | 571 | * |
572 | * @since 1.1 | 572 | * @since 1.1 |
573 | */ | 573 | */ |
574 | EAPI void eina_file_close(Eina_File *file); | 574 | EINA_API void eina_file_close(Eina_File *file); |
575 | 575 | ||
576 | /** | 576 | /** |
577 | * @brief Gets the file size at open time. | 577 | * @brief Gets the file size at open time. |
@@ -581,7 +581,7 @@ EAPI void eina_file_close(Eina_File *file); | |||
581 | * | 581 | * |
582 | * @since 1.1 | 582 | * @since 1.1 |
583 | */ | 583 | */ |
584 | EAPI size_t eina_file_size_get(const Eina_File *file); | 584 | EINA_API size_t eina_file_size_get(const Eina_File *file); |
585 | 585 | ||
586 | /** | 586 | /** |
587 | * @brief Gets the last modification time of an open file. | 587 | * @brief Gets the last modification time of an open file. |
@@ -591,7 +591,7 @@ EAPI size_t eina_file_size_get(const Eina_File *file); | |||
591 | * | 591 | * |
592 | * @since 1.1 | 592 | * @since 1.1 |
593 | */ | 593 | */ |
594 | EAPI time_t eina_file_mtime_get(const Eina_File *file); | 594 | EINA_API time_t eina_file_mtime_get(const Eina_File *file); |
595 | 595 | ||
596 | /** | 596 | /** |
597 | * @brief Gets the filename of an open file. | 597 | * @brief Gets the filename of an open file. |
@@ -601,7 +601,7 @@ EAPI time_t eina_file_mtime_get(const Eina_File *file); | |||
601 | * | 601 | * |
602 | * @since 1.1 | 602 | * @since 1.1 |
603 | */ | 603 | */ |
604 | EAPI const char *eina_file_filename_get(const Eina_File *file); | 604 | EINA_API const char *eina_file_filename_get(const Eina_File *file); |
605 | 605 | ||
606 | /** | 606 | /** |
607 | * @brief Gets the extended attribute of an open file. | 607 | * @brief Gets the extended attribute of an open file. |
@@ -614,7 +614,7 @@ EAPI const char *eina_file_filename_get(const Eina_File *file); | |||
614 | * | 614 | * |
615 | * @since 1.2 | 615 | * @since 1.2 |
616 | */ | 616 | */ |
617 | EAPI Eina_Iterator *eina_file_xattr_get(Eina_File *file); | 617 | EINA_API Eina_Iterator *eina_file_xattr_get(Eina_File *file); |
618 | 618 | ||
619 | /** | 619 | /** |
620 | * @brief Gets the extended attribute of an open file. | 620 | * @brief Gets the extended attribute of an open file. |
@@ -628,7 +628,7 @@ EAPI Eina_Iterator *eina_file_xattr_get(Eina_File *file); | |||
628 | * | 628 | * |
629 | * @since 1.2 | 629 | * @since 1.2 |
630 | */ | 630 | */ |
631 | EAPI Eina_Iterator *eina_file_xattr_value_get(Eina_File *file); | 631 | EINA_API Eina_Iterator *eina_file_xattr_value_get(Eina_File *file); |
632 | 632 | ||
633 | /** | 633 | /** |
634 | * @brief Maps all the files to a buffer. | 634 | * @brief Maps all the files to a buffer. |
@@ -640,7 +640,7 @@ EAPI Eina_Iterator *eina_file_xattr_value_get(Eina_File *file); | |||
640 | * | 640 | * |
641 | * @since 1.1 | 641 | * @since 1.1 |
642 | */ | 642 | */ |
643 | EAPI void *eina_file_map_all(Eina_File *file, Eina_File_Populate rule); | 643 | EINA_API void *eina_file_map_all(Eina_File *file, Eina_File_Populate rule); |
644 | 644 | ||
645 | /** | 645 | /** |
646 | * @brief Maps a part of the file. | 646 | * @brief Maps a part of the file. |
@@ -656,7 +656,7 @@ EAPI void *eina_file_map_all(Eina_File *file, Eina_File_Populate rule); | |||
656 | * | 656 | * |
657 | * @since 1.1 | 657 | * @since 1.1 |
658 | */ | 658 | */ |
659 | EAPI void *eina_file_map_new(Eina_File *file, Eina_File_Populate rule, | 659 | EINA_API void *eina_file_map_new(Eina_File *file, Eina_File_Populate rule, |
660 | unsigned long int offset, unsigned long int length); | 660 | unsigned long int offset, unsigned long int length); |
661 | 661 | ||
662 | /** | 662 | /** |
@@ -667,7 +667,7 @@ EAPI void *eina_file_map_new(Eina_File *file, Eina_File_Populate rule, | |||
667 | * | 667 | * |
668 | * @since 1.1 | 668 | * @since 1.1 |
669 | */ | 669 | */ |
670 | EAPI void eina_file_map_free(Eina_File *file, void *map); | 670 | EINA_API void eina_file_map_free(Eina_File *file, void *map); |
671 | 671 | ||
672 | /** | 672 | /** |
673 | * @brief Asks the OS to populate or otherwise pages of memory in file mapping. | 673 | * @brief Asks the OS to populate or otherwise pages of memory in file mapping. |
@@ -683,7 +683,7 @@ EAPI void eina_file_map_free(Eina_File *file, void *map); | |||
683 | * | 683 | * |
684 | * @since 1.8 | 684 | * @since 1.8 |
685 | */ | 685 | */ |
686 | EAPI void | 686 | EINA_API void |
687 | eina_file_map_populate(Eina_File *file, Eina_File_Populate rule, const void *map, | 687 | eina_file_map_populate(Eina_File *file, Eina_File_Populate rule, const void *map, |
688 | unsigned long int offset, unsigned long int length); | 688 | unsigned long int offset, unsigned long int length); |
689 | 689 | ||
@@ -698,7 +698,7 @@ eina_file_map_populate(Eina_File *file, Eina_File_Populate rule, const void *map | |||
698 | * | 698 | * |
699 | * @since 1.3 | 699 | * @since 1.3 |
700 | */ | 700 | */ |
701 | EAPI Eina_Iterator *eina_file_map_lines(Eina_File *file); | 701 | EINA_API Eina_Iterator *eina_file_map_lines(Eina_File *file); |
702 | 702 | ||
703 | /** | 703 | /** |
704 | * @brief Tells whether there has been an IO error during the life of a mmaped file. | 704 | * @brief Tells whether there has been an IO error during the life of a mmaped file. |
@@ -709,7 +709,7 @@ EAPI Eina_Iterator *eina_file_map_lines(Eina_File *file); | |||
709 | * | 709 | * |
710 | * @since 1.2 | 710 | * @since 1.2 |
711 | */ | 711 | */ |
712 | EAPI Eina_Bool eina_file_map_faulted(Eina_File *file, void *map); | 712 | EINA_API Eina_Bool eina_file_map_faulted(Eina_File *file, void *map); |
713 | 713 | ||
714 | /** | 714 | /** |
715 | * @brief Joins two paths of known length. | 715 | * @brief Joins two paths of known length. |
@@ -768,7 +768,7 @@ static inline size_t eina_file_path_join(char *dst, | |||
768 | * | 768 | * |
769 | * @since 1.19 | 769 | * @since 1.19 |
770 | */ | 770 | */ |
771 | EAPI Eina_Bool eina_file_unlink(const char *pathname); | 771 | EINA_API Eina_Bool eina_file_unlink(const char *pathname); |
772 | 772 | ||
773 | /** | 773 | /** |
774 | * @brief Make sure a file descriptor will be closed on exec. | 774 | * @brief Make sure a file descriptor will be closed on exec. |
@@ -781,7 +781,7 @@ EAPI Eina_Bool eina_file_unlink(const char *pathname); | |||
781 | * | 781 | * |
782 | * @since 1.20 | 782 | * @since 1.20 |
783 | */ | 783 | */ |
784 | EAPI Eina_Bool eina_file_close_on_exec(int fd, Eina_Bool on); | 784 | EINA_API Eina_Bool eina_file_close_on_exec(int fd, Eina_Bool on); |
785 | 785 | ||
786 | #include "eina_inline_file.x" | 786 | #include "eina_inline_file.x" |
787 | 787 | ||
@@ -796,26 +796,26 @@ typedef unsigned int Eina_Statgen; | |||
796 | * @brief Force the stat generation counter to tick over so any following i/o does real i/o and stat calls | 796 | * @brief Force the stat generation counter to tick over so any following i/o does real i/o and stat calls |
797 | * @since 1.23 | 797 | * @since 1.23 |
798 | */ | 798 | */ |
799 | EAPI void eina_file_statgen_next(void); | 799 | EINA_API void eina_file_statgen_next(void); |
800 | 800 | ||
801 | /** | 801 | /** |
802 | * @brief Get the current stat generation counter value | 802 | * @brief Get the current stat generation counter value |
803 | * @return 0 if you should always do stat calls and compare, or some other value that changes like a generation counter | 803 | * @return 0 if you should always do stat calls and compare, or some other value that changes like a generation counter |
804 | * @since 1.23 | 804 | * @since 1.23 |
805 | */ | 805 | */ |
806 | EAPI Eina_Statgen eina_file_statgen_get(void); | 806 | EINA_API Eina_Statgen eina_file_statgen_get(void); |
807 | 807 | ||
808 | /** | 808 | /** |
809 | * @brief Enable stat generation count optimiziing to only stat/do file i/o between generation counts changing | 809 | * @brief Enable stat generation count optimiziing to only stat/do file i/o between generation counts changing |
810 | * @since 1.23 | 810 | * @since 1.23 |
811 | */ | 811 | */ |
812 | EAPI void eina_file_statgen_enable(void); | 812 | EINA_API void eina_file_statgen_enable(void); |
813 | 813 | ||
814 | /** | 814 | /** |
815 | * @brief Disable stat generation count optimiziing to only stat/do file i/o between generation counts changing | 815 | * @brief Disable stat generation count optimiziing to only stat/do file i/o between generation counts changing |
816 | * @since 1.23 | 816 | * @since 1.23 |
817 | */ | 817 | */ |
818 | EAPI void eina_file_statgen_disable(void); | 818 | EINA_API void eina_file_statgen_disable(void); |
819 | 819 | ||
820 | /** | 820 | /** |
821 | * @} | 821 | * @} |
diff --git a/src/lib/eina/eina_file_common.c b/src/lib/eina/eina_file_common.c index 70ac5384fb..d93d2ef7b7 100644 --- a/src/lib/eina/eina_file_common.c +++ b/src/lib/eina/eina_file_common.c | |||
@@ -73,7 +73,7 @@ Eina_Lock _eina_file_lock_cache; | |||
73 | static Eina_Spinlock _eina_statgen_lock; | 73 | static Eina_Spinlock _eina_statgen_lock; |
74 | static Eina_Statgen _eina_statgen = 0; | 74 | static Eina_Statgen _eina_statgen = 0; |
75 | 75 | ||
76 | EAPI void | 76 | EINA_API void |
77 | eina_file_statgen_next(void) | 77 | eina_file_statgen_next(void) |
78 | { | 78 | { |
79 | eina_spinlock_take(&_eina_statgen_lock); | 79 | eina_spinlock_take(&_eina_statgen_lock); |
@@ -85,7 +85,7 @@ eina_file_statgen_next(void) | |||
85 | eina_spinlock_release(&_eina_statgen_lock); | 85 | eina_spinlock_release(&_eina_statgen_lock); |
86 | } | 86 | } |
87 | 87 | ||
88 | EAPI Eina_Statgen | 88 | EINA_API Eina_Statgen |
89 | eina_file_statgen_get(void) | 89 | eina_file_statgen_get(void) |
90 | { | 90 | { |
91 | Eina_Statgen s; | 91 | Eina_Statgen s; |
@@ -95,7 +95,7 @@ eina_file_statgen_get(void) | |||
95 | return s; | 95 | return s; |
96 | } | 96 | } |
97 | 97 | ||
98 | EAPI void | 98 | EINA_API void |
99 | eina_file_statgen_enable(void) | 99 | eina_file_statgen_enable(void) |
100 | { | 100 | { |
101 | eina_spinlock_take(&_eina_statgen_lock); | 101 | eina_spinlock_take(&_eina_statgen_lock); |
@@ -103,7 +103,7 @@ eina_file_statgen_enable(void) | |||
103 | eina_spinlock_release(&_eina_statgen_lock); | 103 | eina_spinlock_release(&_eina_statgen_lock); |
104 | } | 104 | } |
105 | 105 | ||
106 | EAPI void | 106 | EINA_API void |
107 | eina_file_statgen_disable(void) | 107 | eina_file_statgen_disable(void) |
108 | { | 108 | { |
109 | eina_spinlock_take(&_eina_statgen_lock); | 109 | eina_spinlock_take(&_eina_statgen_lock); |
@@ -405,7 +405,7 @@ _eina_file_map_close(Eina_File_Map *map) | |||
405 | 405 | ||
406 | // Global API | 406 | // Global API |
407 | 407 | ||
408 | EAPI char * | 408 | EINA_API char * |
409 | eina_file_path_sanitize(const char *path) | 409 | eina_file_path_sanitize(const char *path) |
410 | { | 410 | { |
411 | Eina_Tmpstr *result = NULL; | 411 | Eina_Tmpstr *result = NULL; |
@@ -430,7 +430,7 @@ eina_file_path_sanitize(const char *path) | |||
430 | return r; | 430 | return r; |
431 | } | 431 | } |
432 | 432 | ||
433 | EAPI Eina_File * | 433 | EINA_API Eina_File * |
434 | eina_file_virtualize(const char *virtual_name, const void *data, unsigned long long length, Eina_Bool copy) | 434 | eina_file_virtualize(const char *virtual_name, const void *data, unsigned long long length, Eina_Bool copy) |
435 | { | 435 | { |
436 | Eina_File *file; | 436 | Eina_File *file; |
@@ -494,7 +494,7 @@ eina_file_virtualize(const char *virtual_name, const void *data, unsigned long l | |||
494 | return file; | 494 | return file; |
495 | } | 495 | } |
496 | 496 | ||
497 | EAPI Eina_Bool | 497 | EINA_API Eina_Bool |
498 | eina_file_virtual(Eina_File *file) | 498 | eina_file_virtual(Eina_File *file) |
499 | { | 499 | { |
500 | if (!file) return EINA_FALSE; | 500 | if (!file) return EINA_FALSE; |
@@ -502,7 +502,7 @@ eina_file_virtual(Eina_File *file) | |||
502 | return file->virtual; | 502 | return file->virtual; |
503 | } | 503 | } |
504 | 504 | ||
505 | EAPI Eina_File * | 505 | EINA_API Eina_File * |
506 | eina_file_dup(const Eina_File *f) | 506 | eina_file_dup(const Eina_File *f) |
507 | { | 507 | { |
508 | Eina_File *file = (Eina_File*) f; | 508 | Eina_File *file = (Eina_File*) f; |
@@ -544,7 +544,7 @@ eina_file_clean_close(Eina_File *file) | |||
544 | free(file); | 544 | free(file); |
545 | } | 545 | } |
546 | 546 | ||
547 | EAPI void | 547 | EINA_API void |
548 | eina_file_close(Eina_File *file) | 548 | eina_file_close(Eina_File *file) |
549 | { | 549 | { |
550 | Eina_Bool leave = EINA_TRUE; | 550 | Eina_Bool leave = EINA_TRUE; |
@@ -574,21 +574,21 @@ eina_file_close(Eina_File *file) | |||
574 | eina_lock_release(&_eina_file_lock_cache); | 574 | eina_lock_release(&_eina_file_lock_cache); |
575 | } | 575 | } |
576 | 576 | ||
577 | EAPI size_t | 577 | EINA_API size_t |
578 | eina_file_size_get(const Eina_File *file) | 578 | eina_file_size_get(const Eina_File *file) |
579 | { | 579 | { |
580 | EINA_FILE_MAGIC_CHECK(file, 0); | 580 | EINA_FILE_MAGIC_CHECK(file, 0); |
581 | return file->length; | 581 | return file->length; |
582 | } | 582 | } |
583 | 583 | ||
584 | EAPI time_t | 584 | EINA_API time_t |
585 | eina_file_mtime_get(const Eina_File *file) | 585 | eina_file_mtime_get(const Eina_File *file) |
586 | { | 586 | { |
587 | EINA_FILE_MAGIC_CHECK(file, 0); | 587 | EINA_FILE_MAGIC_CHECK(file, 0); |
588 | return file->mtime; | 588 | return file->mtime; |
589 | } | 589 | } |
590 | 590 | ||
591 | EAPI const char * | 591 | EINA_API const char * |
592 | eina_file_filename_get(const Eina_File *file) | 592 | eina_file_filename_get(const Eina_File *file) |
593 | { | 593 | { |
594 | EINA_FILE_MAGIC_CHECK(file, NULL); | 594 | EINA_FILE_MAGIC_CHECK(file, NULL); |
@@ -695,7 +695,7 @@ _eina_file_map_lines_iterator_free(Eina_Lines_Iterator *it) | |||
695 | free(it); | 695 | free(it); |
696 | } | 696 | } |
697 | 697 | ||
698 | EAPI Eina_Iterator * | 698 | EINA_API Eina_Iterator * |
699 | eina_file_map_lines(Eina_File *file) | 699 | eina_file_map_lines(Eina_File *file) |
700 | { | 700 | { |
701 | Eina_Lines_Iterator *it; | 701 | Eina_Lines_Iterator *it; |
@@ -952,7 +952,7 @@ _eina_file_copy_internal(int s, int d, off_t total, Eina_File_Copy_Progress cb, | |||
952 | return ret; | 952 | return ret; |
953 | } | 953 | } |
954 | 954 | ||
955 | EAPI Eina_Bool | 955 | EINA_API Eina_Bool |
956 | eina_file_copy(const char *src, const char *dst, Eina_File_Copy_Flags flags, Eina_File_Copy_Progress cb, const void *cb_data) | 956 | eina_file_copy(const char *src, const char *dst, Eina_File_Copy_Flags flags, Eina_File_Copy_Progress cb, const void *cb_data) |
957 | { | 957 | { |
958 | struct stat st; | 958 | struct stat st; |
@@ -1055,7 +1055,7 @@ eina_file_shutdown(void) | |||
1055 | return EINA_TRUE; | 1055 | return EINA_TRUE; |
1056 | } | 1056 | } |
1057 | 1057 | ||
1058 | EAPI Eina_Bool | 1058 | EINA_API Eina_Bool |
1059 | eina_file_close_on_exec(int fd, Eina_Bool on) | 1059 | eina_file_close_on_exec(int fd, Eina_Bool on) |
1060 | { | 1060 | { |
1061 | #ifdef _WIN32 | 1061 | #ifdef _WIN32 |
diff --git a/src/lib/eina/eina_file_posix.c b/src/lib/eina/eina_file_posix.c index 72f0e510fe..c8b4c56919 100644 --- a/src/lib/eina/eina_file_posix.c +++ b/src/lib/eina/eina_file_posix.c | |||
@@ -562,7 +562,7 @@ eina_file_cleanup(Eina_Tmpstr *path) | |||
562 | 562 | ||
563 | 563 | ||
564 | 564 | ||
565 | EAPI Eina_Bool | 565 | EINA_API Eina_Bool |
566 | eina_file_dir_list(const char *dir, | 566 | eina_file_dir_list(const char *dir, |
567 | Eina_Bool recursive, | 567 | Eina_Bool recursive, |
568 | Eina_File_Dir_List_Cb cb, | 568 | Eina_File_Dir_List_Cb cb, |
@@ -594,7 +594,7 @@ eina_file_dir_list(const char *dir, | |||
594 | return EINA_TRUE; | 594 | return EINA_TRUE; |
595 | } | 595 | } |
596 | 596 | ||
597 | EAPI Eina_Array * | 597 | EINA_API Eina_Array * |
598 | eina_file_split(char *path) | 598 | eina_file_split(char *path) |
599 | { | 599 | { |
600 | Eina_Array *ea; | 600 | Eina_Array *ea; |
@@ -627,7 +627,7 @@ eina_file_split(char *path) | |||
627 | return ea; | 627 | return ea; |
628 | } | 628 | } |
629 | 629 | ||
630 | EAPI Eina_Iterator * | 630 | EINA_API Eina_Iterator * |
631 | eina_file_ls(const char *dir) | 631 | eina_file_ls(const char *dir) |
632 | { | 632 | { |
633 | #ifdef HAVE_DIRENT_H | 633 | #ifdef HAVE_DIRENT_H |
@@ -675,7 +675,7 @@ eina_file_ls(const char *dir) | |||
675 | #endif | 675 | #endif |
676 | } | 676 | } |
677 | 677 | ||
678 | EAPI Eina_Iterator * | 678 | EINA_API Eina_Iterator * |
679 | eina_file_direct_ls(const char *dir) | 679 | eina_file_direct_ls(const char *dir) |
680 | { | 680 | { |
681 | #ifdef HAVE_DIRENT_H | 681 | #ifdef HAVE_DIRENT_H |
@@ -735,7 +735,7 @@ eina_file_direct_ls(const char *dir) | |||
735 | #endif | 735 | #endif |
736 | } | 736 | } |
737 | 737 | ||
738 | EAPI Eina_Iterator * | 738 | EINA_API Eina_Iterator * |
739 | eina_file_stat_ls(const char *dir) | 739 | eina_file_stat_ls(const char *dir) |
740 | { | 740 | { |
741 | #ifdef HAVE_DIRENT_H | 741 | #ifdef HAVE_DIRENT_H |
@@ -795,7 +795,7 @@ eina_file_stat_ls(const char *dir) | |||
795 | #endif | 795 | #endif |
796 | } | 796 | } |
797 | 797 | ||
798 | EAPI Eina_File * | 798 | EINA_API Eina_File * |
799 | eina_file_open(const char *path, Eina_Bool shared) | 799 | eina_file_open(const char *path, Eina_Bool shared) |
800 | { | 800 | { |
801 | Eina_File *file; | 801 | Eina_File *file; |
@@ -904,7 +904,7 @@ eina_file_open(const char *path, Eina_Bool shared) | |||
904 | return NULL; | 904 | return NULL; |
905 | } | 905 | } |
906 | 906 | ||
907 | EAPI Eina_Bool | 907 | EINA_API Eina_Bool |
908 | eina_file_refresh(Eina_File *file) | 908 | eina_file_refresh(Eina_File *file) |
909 | { | 909 | { |
910 | struct stat file_stat; | 910 | struct stat file_stat; |
@@ -937,7 +937,7 @@ eina_file_refresh(Eina_File *file) | |||
937 | return r; | 937 | return r; |
938 | } | 938 | } |
939 | 939 | ||
940 | EAPI Eina_Bool | 940 | EINA_API Eina_Bool |
941 | eina_file_unlink(const char *pathname) | 941 | eina_file_unlink(const char *pathname) |
942 | { | 942 | { |
943 | if ( unlink(pathname) < 0) | 943 | if ( unlink(pathname) < 0) |
@@ -947,7 +947,7 @@ eina_file_unlink(const char *pathname) | |||
947 | return EINA_TRUE; | 947 | return EINA_TRUE; |
948 | } | 948 | } |
949 | 949 | ||
950 | EAPI void * | 950 | EINA_API void * |
951 | eina_file_map_all(Eina_File *file, Eina_File_Populate rule) | 951 | eina_file_map_all(Eina_File *file, Eina_File_Populate rule) |
952 | { | 952 | { |
953 | int flags = MAP_SHARED; | 953 | int flags = MAP_SHARED; |
@@ -998,7 +998,7 @@ eina_file_map_all(Eina_File *file, Eina_File_Populate rule) | |||
998 | return ret; | 998 | return ret; |
999 | } | 999 | } |
1000 | 1000 | ||
1001 | EAPI void * | 1001 | EINA_API void * |
1002 | eina_file_map_new(Eina_File *file, Eina_File_Populate rule, | 1002 | eina_file_map_new(Eina_File *file, Eina_File_Populate rule, |
1003 | unsigned long int offset, unsigned long int length) | 1003 | unsigned long int offset, unsigned long int length) |
1004 | { | 1004 | { |
@@ -1077,7 +1077,7 @@ eina_file_map_new(Eina_File *file, Eina_File_Populate rule, | |||
1077 | return NULL; | 1077 | return NULL; |
1078 | } | 1078 | } |
1079 | 1079 | ||
1080 | EAPI void | 1080 | EINA_API void |
1081 | eina_file_map_free(Eina_File *file, void *map) | 1081 | eina_file_map_free(Eina_File *file, void *map) |
1082 | { | 1082 | { |
1083 | EINA_SAFETY_ON_NULL_RETURN(file); | 1083 | EINA_SAFETY_ON_NULL_RETURN(file); |
@@ -1108,7 +1108,7 @@ eina_file_map_free(Eina_File *file, void *map) | |||
1108 | eina_lock_release(&file->lock); | 1108 | eina_lock_release(&file->lock); |
1109 | } | 1109 | } |
1110 | 1110 | ||
1111 | EAPI void | 1111 | EINA_API void |
1112 | eina_file_map_populate(Eina_File *file, Eina_File_Populate rule, const void *map, | 1112 | eina_file_map_populate(Eina_File *file, Eina_File_Populate rule, const void *map, |
1113 | unsigned long int offset, unsigned long int length) | 1113 | unsigned long int offset, unsigned long int length) |
1114 | { | 1114 | { |
@@ -1123,7 +1123,7 @@ eina_file_map_populate(Eina_File *file, Eina_File_Populate rule, const void *map | |||
1123 | eina_lock_release(&file->lock); | 1123 | eina_lock_release(&file->lock); |
1124 | } | 1124 | } |
1125 | 1125 | ||
1126 | EAPI Eina_Bool | 1126 | EINA_API Eina_Bool |
1127 | eina_file_map_faulted(Eina_File *file, void *map) | 1127 | eina_file_map_faulted(Eina_File *file, void *map) |
1128 | { | 1128 | { |
1129 | Eina_Bool r = EINA_FALSE; | 1129 | Eina_Bool r = EINA_FALSE; |
@@ -1165,7 +1165,7 @@ eina_file_map_faulted(Eina_File *file, void *map) | |||
1165 | return r; | 1165 | return r; |
1166 | } | 1166 | } |
1167 | 1167 | ||
1168 | EAPI Eina_Iterator * | 1168 | EINA_API Eina_Iterator * |
1169 | eina_file_xattr_get(Eina_File *file) | 1169 | eina_file_xattr_get(Eina_File *file) |
1170 | { | 1170 | { |
1171 | EINA_SAFETY_ON_NULL_RETURN_VAL(file, NULL); | 1171 | EINA_SAFETY_ON_NULL_RETURN_VAL(file, NULL); |
@@ -1175,7 +1175,7 @@ eina_file_xattr_get(Eina_File *file) | |||
1175 | return eina_xattr_fd_ls(file->fd); | 1175 | return eina_xattr_fd_ls(file->fd); |
1176 | } | 1176 | } |
1177 | 1177 | ||
1178 | EAPI Eina_Iterator * | 1178 | EINA_API Eina_Iterator * |
1179 | eina_file_xattr_value_get(Eina_File *file) | 1179 | eina_file_xattr_value_get(Eina_File *file) |
1180 | { | 1180 | { |
1181 | EINA_SAFETY_ON_NULL_RETURN_VAL(file, NULL); | 1181 | EINA_SAFETY_ON_NULL_RETURN_VAL(file, NULL); |
@@ -1185,7 +1185,7 @@ eina_file_xattr_value_get(Eina_File *file) | |||
1185 | return eina_xattr_value_fd_ls(file->fd); | 1185 | return eina_xattr_value_fd_ls(file->fd); |
1186 | } | 1186 | } |
1187 | 1187 | ||
1188 | EAPI int | 1188 | EINA_API int |
1189 | eina_file_statat(void *container, Eina_File_Direct_Info *info, Eina_Stat *st) | 1189 | eina_file_statat(void *container, Eina_File_Direct_Info *info, Eina_Stat *st) |
1190 | { | 1190 | { |
1191 | struct stat buf; | 1191 | struct stat buf; |
@@ -1312,7 +1312,7 @@ typedef struct | |||
1312 | } Dirent; | 1312 | } Dirent; |
1313 | #endif | 1313 | #endif |
1314 | 1314 | ||
1315 | EAPI void | 1315 | EINA_API void |
1316 | eina_file_close_from(int fd, int *except_fd) | 1316 | eina_file_close_from(int fd, int *except_fd) |
1317 | { | 1317 | { |
1318 | #if defined(_WIN32) | 1318 | #if defined(_WIN32) |
@@ -1510,7 +1510,7 @@ skip3: | |||
1510 | #endif | 1510 | #endif |
1511 | } | 1511 | } |
1512 | 1512 | ||
1513 | EAPI int | 1513 | EINA_API int |
1514 | eina_file_mkstemp(const char *templatename, Eina_Tmpstr **path) | 1514 | eina_file_mkstemp(const char *templatename, Eina_Tmpstr **path) |
1515 | { | 1515 | { |
1516 | char buffer[PATH_MAX]; | 1516 | char buffer[PATH_MAX]; |
@@ -1556,7 +1556,7 @@ eina_file_mkstemp(const char *templatename, Eina_Tmpstr **path) | |||
1556 | return fd; | 1556 | return fd; |
1557 | } | 1557 | } |
1558 | 1558 | ||
1559 | EAPI Eina_Bool | 1559 | EINA_API Eina_Bool |
1560 | eina_file_mkdtemp(const char *templatename, Eina_Tmpstr **path) | 1560 | eina_file_mkdtemp(const char *templatename, Eina_Tmpstr **path) |
1561 | { | 1561 | { |
1562 | char buffer[PATH_MAX]; | 1562 | char buffer[PATH_MAX]; |
diff --git a/src/lib/eina/eina_file_win32.c b/src/lib/eina/eina_file_win32.c index b5c0c418c0..455d583b96 100644 --- a/src/lib/eina/eina_file_win32.c +++ b/src/lib/eina/eina_file_win32.c | |||
@@ -559,7 +559,7 @@ eina_file_cleanup(Eina_Tmpstr *path) | |||
559 | * API * | 559 | * API * |
560 | *============================================ |