summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2019-12-05 18:55:06 -0800
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-12-11 10:36:14 +0100
commite4765e3806eb37e5d2b2fae202550c14bb90ce23 (patch)
treedd9f6e5797e37054acfa4ae97c9c274c1afc7e9d
parent939b0f1a9cc149e0b5090d3733e473f5edf5214f (diff)
eina: introduce an explicit eina_cow_done with no call to GC.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D10817
-rw-r--r--src/lib/eina/eina_cow.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/eina/eina_cow.h b/src/lib/eina/eina_cow.h
index 800371b..4836d3e 100644
--- a/src/lib/eina/eina_cow.h
+++ b/src/lib/eina/eina_cow.h
@@ -177,6 +177,24 @@ EAPI Eina_Bool eina_cow_gc(Eina_Cow *cow);
177 while (0); 177 while (0);
178 178
179/** 179/**
180 * @def EINA_COW_WRITE_END_NOGC
181 * @brief Definition for the macro to close the writeable pointer without triggering the GC.
182 *
183 * @param[in,out] Cow The Eina_Cow where the const pointer came from.
184 * @param[in] Read The const pointer to get a writable handler from.
185 * @param[in] Write The name of the variable where to put the writeable pointer to.
186 *
187 * @since 1.8.0
188 *
189 * @note This macro closes the scope opened by EINA_COW_WRITE_BEGIN().
190 */
191#define EINA_COW_WRITE_END_NOGC(Cow, Read, Write) \
192 eina_cow_done(Cow, ((const Eina_Cow_Data**)&(Read)), Write, \
193 EINA_FALSE); \
194 } \
195 while (0);
196
197/**
180 * @} 198 * @}
181 */ 199 */
182 200