summaryrefslogtreecommitdiff
path: root/src/scripts
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-05-26 17:41:22 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-05-26 17:41:22 +0200
commit13ddc5dbc165f3fead4a70301073bc901dbc1269 (patch)
tree2d4022f6bf3ffcf332efae28aae436e9b9a6f678 /src/scripts
parentd0fed247bbb18933b3d5c086126ac0f7b8d05e76 (diff)
eolian: rename @warn_unused and its associated API
@warn_unused in syntax is now called @no_unused - this is because "warning about unused" is a C thing (or rather, an extension to C) and various languages might want to use stricter behavior for this. Its associated API does the reverse now - it lets you query whether being unused is allowed at all. This is to match future behavior of Eolian (once it supports versioning) that will likely reverse it. @feature
Diffstat (limited to 'src/scripts')
-rw-r--r--src/scripts/pyolian/eolian.py4
-rw-r--r--src/scripts/pyolian/eolian_lib.py6
-rwxr-xr-xsrc/scripts/pyolian/test_eolian.py2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py
index 216c94ed8a..d5c99a1990 100644
--- a/src/scripts/pyolian/eolian.py
+++ b/src/scripts/pyolian/eolian.py
@@ -925,8 +925,8 @@ class Function(Object):
925 c_doc = lib.eolian_function_return_documentation_get(self, ftype) 925 c_doc = lib.eolian_function_return_documentation_get(self, ftype)
926 return Documentation(c_doc) if c_doc else None 926 return Documentation(c_doc) if c_doc else None
927 927
928 def return_is_warn_unused(self, ftype): 928 def return_allow_unused(self, ftype):
929 return bool(lib.eolian_function_return_is_warn_unused(self, ftype)) 929 return bool(lib.eolian_function_return_allow_unused(self, ftype))
930 930
931 @cached_property 931 @cached_property
932 def method_return_type(self): 932 def method_return_type(self):
diff --git a/src/scripts/pyolian/eolian_lib.py b/src/scripts/pyolian/eolian_lib.py
index c278442c75..d8ee7f04d9 100644
--- a/src/scripts/pyolian/eolian_lib.py
+++ b/src/scripts/pyolian/eolian_lib.py
@@ -352,9 +352,9 @@ lib.eolian_function_return_default_value_get.restype = c_void_p
352lib.eolian_function_return_documentation_get.argtypes = (c_void_p, c_int) 352lib.eolian_function_return_documentation_get.argtypes = (c_void_p, c_int)
353lib.eolian_function_return_documentation_get.restype = c_void_p 353lib.eolian_function_return_documentation_get.restype = c_void_p
354 354
355# EAPI Eina_Bool eolian_function_return_is_warn_unused(const Eolian_Function *foo_id, Eolian_Function_Type ftype); 355# EAPI Eina_Bool eolian_function_return_allow_unused(const Eolian_Function *foo_id, Eolian_Function_Type ftype);
356lib.eolian_function_return_is_warn_unused.argtypes = (c_void_p, c_int) 356lib.eolian_function_return_allow_unused.argtypes = (c_void_p, c_int)
357lib.eolian_function_return_is_warn_unused.restype = c_bool 357lib.eolian_function_return_allow_unused.restype = c_bool
358 358
359# EAPI Eina_Bool eolian_function_object_is_const(const Eolian_Function *function_id); 359# EAPI Eina_Bool eolian_function_object_is_const(const Eolian_Function *function_id);
360lib.eolian_function_object_is_const.argtypes = (c_void_p,) 360lib.eolian_function_object_is_const.argtypes = (c_void_p,)
diff --git a/src/scripts/pyolian/test_eolian.py b/src/scripts/pyolian/test_eolian.py
index df7740bc19..de58a1c362 100755
--- a/src/scripts/pyolian/test_eolian.py
+++ b/src/scripts/pyolian/test_eolian.py
@@ -368,7 +368,7 @@ class TestEolianFunction(unittest.TestCase):
368 self.assertEqual(len(list(f.getter_values)), 1) 368 self.assertEqual(len(list(f.getter_values)), 1)
369 self.assertEqual(len(list(f.getter_values)), 1) 369 self.assertEqual(len(list(f.getter_values)), 1)
370 self.assertEqual(len(list(f.parameters)), 1) 370 self.assertEqual(len(list(f.parameters)), 1)
371 self.assertFalse(f.return_is_warn_unused(eolian.Eolian_Function_Type.METHOD)) 371 self.assertTrue(f.return_allow_unused(eolian.Eolian_Function_Type.METHOD))
372 self.assertFalse(f.object_is_const) 372 self.assertFalse(f.object_is_const)
373 self.assertEqual(f.class_.name, 'Efl.Loop_Timer') 373 self.assertEqual(f.class_.name, 'Efl.Loop_Timer')
374 self.assertIsInstance(f.implement, eolian.Implement) 374 self.assertIsInstance(f.implement, eolian.Implement)