q66 pushed a commit to branch master.

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

commit 4b27fe657199abd812d3e73fddbd60e01efc1550
Author: Daniel Kolesa <[email protected]>
Date:   Fri Sep 15 16:33:57 2017 +0200

    eolian: add API to check for @owned
---
 src/lib/eolian/Eolian.h            | 12 ++++++++++++
 src/lib/eolian/database_type_api.c |  7 +++++++
 2 files changed, 19 insertions(+)

diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index 554f84c71d..06299b8129 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -1846,6 +1846,18 @@ EAPI size_t eolian_type_array_size_get(const Eolian_Type 
*tp);
 EAPI Eina_Bool eolian_type_is_own(const Eolian_Type *tp);
 
 /*
+ * @brief Get whether the given type is owned.
+ *
+ * This is true when a parameter, return or whatever is marked as @owned.
+ *
+ * @param[in] tp the type.
+ * @return EINA_TRUE when the type is marked owned, EINA_FALSE otherwise.
+ *
+ * @ingroup Eolian
+ */
+EAPI Eina_Bool eolian_type_is_owned(const Eolian_Type *tp);
+
+/*
  * @brief Get whether the given type is const.
  *
  * @param[in] tp the type.
diff --git a/src/lib/eolian/database_type_api.c 
b/src/lib/eolian/database_type_api.c
index e986611fe6..2f6a86fbf4 100644
--- a/src/lib/eolian/database_type_api.c
+++ b/src/lib/eolian/database_type_api.c
@@ -334,6 +334,13 @@ eolian_type_is_own(const Eolian_Type *tp)
 }
 
 EAPI Eina_Bool
+eolian_type_is_owned(const Eolian_Type *tp)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(tp, EINA_FALSE);
+   return tp->owned;
+}
+
+EAPI Eina_Bool
 eolian_type_is_const(const Eolian_Type *tp)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(tp, EINA_FALSE);

-- 


Reply via email to