summaryrefslogtreecommitdiff
path: root/src/lib/eina/eina_cow.h
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2013-11-25 23:33:51 +0100
committerBoris Faure <billiob@gmail.com>2013-11-30 15:41:08 +0100
commitf45618d15b00cf3619fd22df4459bb700cc25f70 (patch)
treede6a18eba4eee919cb506fe94de516f813172952 /src/lib/eina/eina_cow.h
parent1cad4c2afecd274d9fc5d913ba1137f2bee55230 (diff)
fix eina_cow issues. Closes T581, T527
Diffstat (limited to '')
-rw-r--r--src/lib/eina/eina_cow.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/eina/eina_cow.h b/src/lib/eina/eina_cow.h
index 10cb34d28d..bbbcf4b677 100644
--- a/src/lib/eina/eina_cow.h
+++ b/src/lib/eina/eina_cow.h
@@ -56,9 +56,9 @@ typedef void Eina_Cow_Data;
56 * 56 *
57 * @param name The name of this pool, used for debug. 57 * @param name The name of this pool, used for debug.
58 * @param struct_size The size of the object from this pool. 58 * @param struct_size The size of the object from this pool.
59 * @param step How many object to allocate when the pool get empty. 59 * @param step How many objects to allocate when the pool gets empty.
60 * @param default_value The default value returned by this pool. 60 * @param default_value The default value returned by this pool.
61 * @param gc Is it possible to run the garbage collection on this pool. 61 * @param 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 */
64EAPI 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; 64EAPI 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;
@@ -71,7 +71,7 @@ EAPI Eina_Cow *eina_cow_add(const char *name, unsigned int struct_size, unsigned
71EAPI void eina_cow_del(Eina_Cow *cow); 71EAPI void eina_cow_del(Eina_Cow *cow);
72 72
73/** 73/**
74 * @brief Return a initialized pointer to the pool. 74 * @brief Return an initialized pointer from the pool.
75 * @param cow The pool to take things from. 75 * @param cow The pool to take things from.
76 */ 76 */
77EAPI const Eina_Cow_Data *eina_cow_alloc(Eina_Cow *cow) EINA_WARN_UNUSED_RESULT; 77EAPI const Eina_Cow_Data *eina_cow_alloc(Eina_Cow *cow) EINA_WARN_UNUSED_RESULT;
@@ -98,8 +98,8 @@ EAPI void *eina_cow_write(Eina_Cow *cow,
98/** 98/**
99 * @brief Set back a pointer into read only. 99 * @brief Set back a pointer into read only.
100 * @param cow The pool the pointer come from. 100 * @param cow The pool the pointer come from.
101 * @param src The read only version of the pointer. 101 * @param dst The read only version of the pointer.
102 * @param data The pointer to which data where written to. 102 * @param data The pointer to which data was written to.
103 * 103 *
104 * NOTE: this function is not thread safe, be careful. 104 * NOTE: this function is not thread safe, be careful.
105 */ 105 */
@@ -118,13 +118,13 @@ EAPI void eina_cow_memcpy(Eina_Cow *cow,
118 const Eina_Cow_Data *src); 118 const Eina_Cow_Data *src);
119 119
120/** 120/**
121 * @brief Try to find entry that do have the same content and update them. 121 * @brief Try to find entries that have the same content and update them.
122 * @param cow The cow to try to compact. 122 * @param cow The cow to try to compact.
123 * @return EINA_TRUE if something was compacted, EINA_FALSE if nothing was. 123 * @return EINA_TRUE if something was compacted, EINA_FALSE if nothing was.
124 * 124 *
125 * There is no guaranty in the time it will require, but should remain low. 125 * There is no guaranty in the time it will require, but should remain low.
126 * It does run a hash function on all possible common structure trying to 126 * It does run a hash function on all possible common structures trying to
127 * find the one that match and merge then into one pointer. 127 * find the one that match and merge them into one pointer.
128 */ 128 */
129EAPI Eina_Bool eina_cow_gc(Eina_Cow *cow); 129EAPI Eina_Bool eina_cow_gc(Eina_Cow *cow);
130 130
@@ -137,7 +137,7 @@ EAPI Eina_Bool eina_cow_gc(Eina_Cow *cow);
137 * @param Write The name of the variable where to put the writeable pointer to. 137 * @param Write The name of the variable where to put the writeable pointer to.
138 * @since 1.8.0 138 * @since 1.8.0
139 * 139 *
140 * Be careful this macro open a C scope that it expect to be closed by 140 * Be careful this macro opens a C scope that is expected to be closed by
141 * EINA_COW_WRITE_END(). 141 * EINA_COW_WRITE_END().
142 */ 142 */
143#define EINA_COW_WRITE_BEGIN(Cow, Read, Write_Type, Write) \ 143#define EINA_COW_WRITE_BEGIN(Cow, Read, Write_Type, Write) \