aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2018-03-02 14:39:57 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2018-03-02 14:39:57 +0100
commit9e8d96671eab831daee56e664bd88b00ca7b53c6 (patch)
tree210cf9f3894f97bbe3df11745658f3c5edd8323a
parentelua: objectify unit and redo class retrieval (diff)
downloadefl-9e8d96671eab831daee56e664bd88b00ca7b53c6.tar.gz
elua: add missing APIs to eolian bindings
-rw-r--r--src/bindings/luajit/eolian.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 7c29337511..6faa91c8ba 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -595,6 +595,19 @@ ffi.metatype("Eolian_State", {
return ffi.cast("Eolian_Unit *", self)
end,
+ unit_by_file_get = function(self, fname)
+ local v = eolian.eolian_state_unit_by_file_get(state, fname)
+ if v == nil then
+ return nil
+ end
+ return v
+ end,
+
+ units_get = function(self)
+ return Ptr_Iterator("const Eolian_Unit*",
+ eolian.eolian_state_units_get(self))
+ end,
+
class_by_name_get = function(self, cname)
local v = eolian.eolian_state_class_by_name_get(self, cname)
if v == nil then return nil end
@@ -619,6 +632,17 @@ ffi.metatype("Eolian_State", {
ffi.metatype("Eolian_Unit", {
__index = {
+ children_get = function(self)
+ return Ptr_Iterator("const Eolian_Unit*",
+ eolian.eolian_unit_children_get(self))
+ end,
+
+ file_get = function(self)
+ local v = eolian.eolian_unit_file_get(self)
+ if v == nil then return nil end
+ return ffi.string(v)
+ end,
+
class_by_name_get = function(self, cname)
local v = eolian.eolian_unit_class_by_name_get(self, cname)
if v == nil then return nil end