summaryrefslogtreecommitdiff
path: root/src/bindings
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2017-05-25 16:18:10 +0200
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2017-05-30 17:15:54 +0200
commitc234b5ee69186ec8dc02e3742d055ff24f0afba6 (patch)
treed8a90879dd72f689cfa0c1db6a8d2b37c024ac16 /src/bindings
parent4125e3f34bf3c6bc3d61aebfbe73263d0eac8b17 (diff)
eolian: expr eval APIs now take units
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/luajit/eolian.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 25fd292..b59dc37 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -356,8 +356,8 @@ ffi.cdef [[
356 const char *eolian_type_free_func_get(const Eolian_Type *tp); 356 const char *eolian_type_free_func_get(const Eolian_Type *tp);
357 const char *eolian_typedecl_free_func_get(const Eolian_Typedecl *tp); 357 const char *eolian_typedecl_free_func_get(const Eolian_Typedecl *tp);
358 358
359 Eolian_Value_t eolian_expression_eval(const Eolian_Expression *expr, Eolian_Expression_Mask m); 359 Eolian_Value_t eolian_expression_eval(const Eolian_Unit *unit, const Eolian_Expression *expr, Eolian_Expression_Mask m);
360 Eolian_Value_t eolian_expression_eval_type(const Eolian_Expression *expr, const Eolian_Type *type); 360 Eolian_Value_t eolian_expression_eval_type(const Eolian_Unit *unit, const Eolian_Expression *expr, const Eolian_Type *type);
361 const char *eolian_expression_value_to_literal(const Eolian_Value *v); 361 const char *eolian_expression_value_to_literal(const Eolian_Value *v);
362 const char *eolian_expression_serialize(const Eolian_Expression *expr); 362 const char *eolian_expression_serialize(const Eolian_Expression *expr);
363 Eolian_Expression_Type eolian_expression_type_get(const Eolian_Expression *expr); 363 Eolian_Expression_Type eolian_expression_type_get(const Eolian_Expression *expr);
@@ -1309,15 +1309,15 @@ M.unary_operator = {
1309 1309
1310M.Expression = ffi.metatype("Eolian_Expression", { 1310M.Expression = ffi.metatype("Eolian_Expression", {
1311 __index = { 1311 __index = {
1312 eval = function(self, mask) 1312 eval = function(self, unit, mask)
1313 mask = mask or emask.ALL 1313 mask = mask or emask.ALL
1314 local v = eolian.eolian_expression_eval(self, mask) 1314 local v = eolian.eolian_expression_eval(unit, self, mask)
1315 if v == nil then return nil end 1315 if v == nil then return nil end
1316 return ffi.cast("Eolian_Value*", v) 1316 return ffi.cast("Eolian_Value*", v)
1317 end, 1317 end,
1318 1318
1319 eval_type = function(self, tp) 1319 eval_type = function(self, unit, tp)
1320 local v = eolian.eolian_expression_eval_type(self, tp) 1320 local v = eolian.eolian_expression_eval_type(unit, self, tp)
1321 if v == nil then return nil end 1321 if v == nil then return nil end
1322 return ffi.cast("Eolian_Value*", v) 1322 return ffi.cast("Eolian_Value*", v)
1323 end, 1323 end,