bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e4765e3806eb37e5d2b2fae202550c14bb90ce23

commit e4765e3806eb37e5d2b2fae202550c14bb90ce23
Author: Cedric BAIL <cedric.b...@free.fr>
Date:   Thu Dec 5 18:55:06 2019 -0800

    eina: introduce an explicit eina_cow_done with no call to GC.
    
    Reviewed-by: Marcel Hollerbach <m...@marcel-hollerbach.de>
    Differential Revision: https://phab.enlightenment.org/D10817
---
 src/lib/eina/eina_cow.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/src/lib/eina/eina_cow.h b/src/lib/eina/eina_cow.h
index 800371b1ad..4836d3e870 100644
--- a/src/lib/eina/eina_cow.h
+++ b/src/lib/eina/eina_cow.h
@@ -176,6 +176,24 @@ EAPI Eina_Bool eina_cow_gc(Eina_Cow *cow);
     }                                                                  \
   while (0);
 
+/**
+ * @def EINA_COW_WRITE_END_NOGC
+ * @brief Definition for the macro to close the writeable pointer without 
triggering the GC.
+ *
+ * @param[in,out] Cow The Eina_Cow where the const pointer came from.
+ * @param[in] Read The const pointer to get a writable handler from.
+ * @param[in] Write The name of the variable where to put the writeable 
pointer to.
+ *
+ * @since 1.8.0
+ *
+ * @note This macro closes the scope opened by EINA_COW_WRITE_BEGIN().
+ */
+#define EINA_COW_WRITE_END_NOGC(Cow, Read, Write)                       \
+      eina_cow_done(Cow, ((const Eina_Cow_Data**)&(Read)), Write,      \
+                   EINA_FALSE);                                        \
+    }                                                                  \
+  while (0);
+
 /**
  * @}
  */

-- 


Reply via email to