summaryrefslogtreecommitdiff
path: root/src/bindings
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2016-06-10 14:28:19 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2016-06-10 14:28:19 +0100
commit33c147f6d42d4377b0ea368101071d4e1db25cac (patch)
tree6df346205126b0b44a2a1c807f1b56c7c2a7c779 /src/bindings
parent93eadd76d6d49bbe1e49eaf976b4c6fd5545f340 (diff)
downloadefl-33c147f6d42d4377b0ea368101071d4e1db25cac.tar.gz
eolian: remove the unnecessary subtypes API
Inner type can now be retrieved as a base type of the type. If the type has two inner types or more, there is a new API that allows you to get the second inner type by calling it on the first one (same would apply to getting third via second etc.). This API is simpler to use and doesn't require an iterator.
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/luajit/eolian.lua13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 159fc0a70c..4f8a1c9012 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -274,7 +274,6 @@ ffi.cdef [[
Eina_Iterator *eolian_typedecl_all_enums_get(void);
Eolian_Type_Type eolian_type_type_get(const Eolian_Type *tp);
Eolian_Typedecl_Type eolian_typedecl_type_get(const Eolian_Typedecl *tp);
- Eina_Iterator *eolian_type_subtypes_get(const Eolian_Type *tp);
Eina_Iterator *eolian_typedecl_struct_fields_get(const Eolian_Typedecl *tp);
const Eolian_Struct_Type_Field *eolian_typedecl_struct_field_get(const Eolian_Typedecl *tp, const char *field);
const char *eolian_typedecl_struct_field_name_get(const Eolian_Struct_Type_Field *fl);
@@ -293,6 +292,7 @@ ffi.cdef [[
const char *eolian_typedecl_file_get(const Eolian_Typedecl *tp);
const Eolian_Type *eolian_type_base_type_get(const Eolian_Type *tp);
+ const Eolian_Type *eolian_type_next_type_get(const Eolian_Type *tp);
const Eolian_Type *eolian_typedecl_base_type_get(const Eolian_Typedecl *tp);
const Eolian_Typedecl *eolian_type_typedecl_get(const Eolian_Type *tp);
@@ -614,11 +614,6 @@ M.Type = ffi.metatype("Eolian_Type", {
return tonumber(eolian.eolian_type_type_get(self))
end,
- subtypes_get = function(self)
- return Ptr_Iterator("const Eolian_Type*",
- eolian.eolian_type_subtypes_get(self))
- end,
-
file_get = function(self, name)
local v = eolian.eolian_type_file_get(self)
if v == nil then return nil end
@@ -631,6 +626,12 @@ M.Type = ffi.metatype("Eolian_Type", {
return v
end,
+ next_type_get = function(self)
+ local v = eolian.eolian_type_next_type_get(self)
+ if v == nil then return nil end
+ return v
+ end,
+
typedecl_get = function(self)
local v = eolian.eolian_type_typedecl_get(self)
if v == nil then return nil end