summaryrefslogtreecommitdiff
path: root/src/scripts
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-05-16 15:52:46 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-05-16 15:52:46 +0200
commitb3a870c7bb29461c6478fae9f51c211229b62d9d (patch)
tree59e42cceb4526bcd8462d5a85a1f95f223957df5 /src/scripts
parent4ab1f2388eb303f8e5d9eae31cdcf39df683c736 (diff)
eolian: rename eolian_typedecl_enum_field_c_name_get
This is to allow for better object oriented APIs, as the `c_name` field would be inherited from Object. This also makes it more clear in C.
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 502c658971..787c9ff694 100644
--- a/src/scripts/pyolian/eolian.py
+++ b/src/scripts/pyolian/eolian.py
@@ -1190,8 +1190,8 @@ class Enum_Type_Field(Object):
1190 return "<eolian.Enum_Type_Field '{0.name}', c_name='{0.c_name}'>".format(self) 1190 return "<eolian.Enum_Type_Field '{0.name}', c_name='{0.c_name}'>".format(self)
1191 1191
1192 @cached_property 1192 @cached_property
1193 def c_name(self): 1193 def c_constant(self):
1194 s = lib.eolian_typedecl_enum_field_c_name_get(self) 1194 s = lib.eolian_typedecl_enum_field_c_constant_get(self)
1195 ret = _str_to_py(s) 1195 ret = _str_to_py(s)
1196 lib.eina_stringshare_del(c_void_p(s)) 1196 lib.eina_stringshare_del(c_void_p(s))
1197 return ret 1197 return ret
diff --git a/src/scripts/pyolian/eolian_lib.py b/src/scripts/pyolian/eolian_lib.py
index 655684b66b..15863cf3b4 100644
--- a/src/scripts/pyolian/eolian_lib.py
+++ b/src/scripts/pyolian/eolian_lib.py
@@ -525,9 +525,9 @@ lib.eolian_typedecl_enum_fields_get.restype = c_void_p
525lib.eolian_typedecl_enum_field_get.argtypes = (c_void_p, c_char_p) 525lib.eolian_typedecl_enum_field_get.argtypes = (c_void_p, c_char_p)
526lib.eolian_typedecl_enum_field_get.restype = c_void_p 526lib.eolian_typedecl_enum_field_get.restype = c_void_p
527 527
528# EAPI Eina_Stringshare *eolian_typedecl_enum_field_c_name_get(const Eolian_Enum_Type_Field *fl); 528# EAPI Eina_Stringshare *eolian_typedecl_enum_field_c_constant_get(const Eolian_Enum_Type_Field *fl);
529lib.eolian_typedecl_enum_field_c_name_get.argtypes = (c_void_p,) 529lib.eolian_typedecl_enum_field_c_constant_get.argtypes = (c_void_p,)
530lib.eolian_typedecl_enum_field_c_name_get.restype = c_void_p # Stringshare TO BE FREED 530lib.eolian_typedecl_enum_field_c_constant_get.restype = c_void_p # Stringshare TO BE FREED
531 531
532# EAPI const Eolian_Documentation *eolian_typedecl_enum_field_documentation_get(const Eolian_Enum_Type_Field *fl); 532# EAPI const Eolian_Documentation *eolian_typedecl_enum_field_documentation_get(const Eolian_Enum_Type_Field *fl);
533lib.eolian_typedecl_enum_field_documentation_get.argtypes = (c_void_p,) 533lib.eolian_typedecl_enum_field_documentation_get.argtypes = (c_void_p,)
diff --git a/src/scripts/pyolian/test_eolian.py b/src/scripts/pyolian/test_eolian.py
index b394c502cf..0a28cb1010 100755
--- a/src/scripts/pyolian/test_eolian.py
+++ b/src/scripts/pyolian/test_eolian.py
@@ -512,7 +512,7 @@ class TestEolianTypedecl(unittest.TestCase):
512 field = td.enum_field_get('v1_0') 512 field = td.enum_field_get('v1_0')
513 self.assertIsInstance(field, eolian.Enum_Type_Field) 513 self.assertIsInstance(field, eolian.Enum_Type_Field)
514 self.assertEqual(field.name, 'v1_0') 514 self.assertEqual(field.name, 'v1_0')
515 self.assertEqual(field.c_name, 'EFL_NET_HTTP_VERSION_V1_0') 515 self.assertEqual(field.c_constant, 'EFL_NET_HTTP_VERSION_V1_0')
516 self.assertIsInstance(field.documentation, eolian.Documentation) 516 self.assertIsInstance(field.documentation, eolian.Documentation)
517 self.assertIsInstance(field.value, eolian.Expression) 517 self.assertIsInstance(field.value, eolian.Expression)
518 518