summaryrefslogtreecommitdiff
path: root/src/lib/eolian
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-09-10 14:06:46 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-09-10 14:06:46 +0200
commitb880a1c7e8b92f1a8fc08ee26e93d879a36de7d0 (patch)
tree2ba76a24575d5767c994d5d5f611a900d25f72c7 /src/lib/eolian
parent6d465b0b1ffec1cf0f87243143c5a1a5b441b496 (diff)
eolian: add an optional warning for ptr() usage in stable API
Diffstat (limited to 'src/lib/eolian')
-rw-r--r--src/lib/eolian/database_validate.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c
index 82b176163d..aa0976600f 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -14,6 +14,7 @@ typedef struct _Validate_State
14 Eina_Bool stable; 14 Eina_Bool stable;
15 Eina_Bool unimplemented; 15 Eina_Bool unimplemented;
16 Eina_Bool unimplemented_beta; 16 Eina_Bool unimplemented_beta;
17 Eina_Bool ptr_stable;
17} Validate_State; 18} Validate_State;
18 19
19static Eina_Bool 20static Eina_Bool
@@ -260,6 +261,8 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
260 261
261 if (tp->is_ptr) 262 if (tp->is_ptr)
262 { 263 {
264 if (vals->stable && vals->ptr_stable)
265 _eo_parser_log(&tp->base, "ptr() used in stable API");
263 tp->is_ptr = EINA_FALSE; 266 tp->is_ptr = EINA_FALSE;
264 Eina_Bool still_ownable = database_type_is_ownable(src, tp, EINA_FALSE); 267 Eina_Bool still_ownable = database_type_is_ownable(src, tp, EINA_FALSE);
265 tp->is_ptr = EINA_TRUE; 268 tp->is_ptr = EINA_TRUE;
@@ -1473,6 +1476,7 @@ database_validate(const Eolian_Unit *src)
1473 EINA_TRUE, 1476 EINA_TRUE,
1474 !!getenv("EOLIAN_CLASS_UNIMPLEMENTED_WARN"), 1477 !!getenv("EOLIAN_CLASS_UNIMPLEMENTED_WARN"),
1475 !!getenv("EOLIAN_CLASS_UNIMPLEMENTED_BETA_WARN"), 1478 !!getenv("EOLIAN_CLASS_UNIMPLEMENTED_BETA_WARN"),
1479 !!getenv("EOLIAN_PTR_STABLE_WARN")
1476 }; 1480 };
1477 1481
1478 /* do an initial pass to refill inherits */ 1482 /* do an initial pass to refill inherits */