summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2017-09-15 16:33:57 +0200
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2017-09-15 16:33:57 +0200
commit4b27fe657199abd812d3e73fddbd60e01efc1550 (patch)
tree61b9108bf1ecb0108cf34948ec81c3afad005440 /src
parent010650663b4abe5954b0deea3708d905cb87a615 (diff)
eolian: add API to check for @owned
Diffstat (limited to 'src')
-rw-r--r--src/lib/eolian/Eolian.h12
-rw-r--r--src/lib/eolian/database_type_api.c7
2 files changed, 19 insertions, 0 deletions
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);
1846EAPI Eina_Bool eolian_type_is_own(const Eolian_Type *tp); 1846EAPI Eina_Bool eolian_type_is_own(const Eolian_Type *tp);
1847 1847
1848/* 1848/*
1849 * @brief Get whether the given type is owned.
1850 *
1851 * This is true when a parameter, return or whatever is marked as @owned.
1852 *
1853 * @param[in] tp the type.
1854 * @return EINA_TRUE when the type is marked owned, EINA_FALSE otherwise.
1855 *
1856 * @ingroup Eolian
1857 */
1858EAPI Eina_Bool eolian_type_is_owned(const Eolian_Type *tp);
1859
1860/*
1849 * @brief Get whether the given type is const. 1861 * @brief Get whether the given type is const.
1850 * 1862 *
1851 * @param[in] tp the type. 1863 * @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)
334} 334}
335 335
336EAPI Eina_Bool 336EAPI Eina_Bool
337eolian_type_is_owned(const Eolian_Type *tp)
338{
339 EINA_SAFETY_ON_NULL_RETURN_VAL(tp, EINA_FALSE);
340 return tp->owned;
341}
342
343EAPI Eina_Bool
337eolian_type_is_const(const Eolian_Type *tp) 344eolian_type_is_const(const Eolian_Type *tp)
338{ 345{
339 EINA_SAFETY_ON_NULL_RETURN_VAL(tp, EINA_FALSE); 346 EINA_SAFETY_ON_NULL_RETURN_VAL(tp, EINA_FALSE);