summaryrefslogtreecommitdiff
path: root/src/bindings
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-13 17:56:18 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-13 17:57:03 +0100
commitd2365e6267c8bcd22c96176e4356328e6b6bfaef (patch)
tree2990b6dc6cacd3fbf72751cc4ea6c05d1f6f7163 /src/bindings
parent333e8766295dee32dcbd1b5f2a2b9f2d3d941b44 (diff)
eolian: allow forced retrieval of enum field values
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/luajit/eolian.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 21c73d7ece..334d141292 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -270,10 +270,10 @@ ffi.cdef [[
270 const char *eolian_type_struct_field_description_get(const Eolian_Struct_Type_Field *fl); 270 const char *eolian_type_struct_field_description_get(const Eolian_Struct_Type_Field *fl);
271 const Eolian_Type *eolian_type_struct_field_type_get(const Eolian_Struct_Type_Field *fl); 271 const Eolian_Type *eolian_type_struct_field_type_get(const Eolian_Struct_Type_Field *fl);
272 Eina_Iterator *eolian_type_enum_fields_get(const Eolian_Type *tp); 272 Eina_Iterator *eolian_type_enum_fields_get(const Eolian_Type *tp);
273 const Eolian_Enum_Type_Field *eolian_type_enum_field_get(const Eolian_Type *tp, const char *field); 273 Eolian_Enum_Type_Field *eolian_type_enum_field_get(const Eolian_Type *tp, const char *field);
274 const char *eolian_type_enum_field_name_get(const Eolian_Enum_Type_Field *fl); 274 const char *eolian_type_enum_field_name_get(const Eolian_Enum_Type_Field *fl);
275 const char *eolian_type_enum_field_description_get(const Eolian_Enum_Type_Field *fl); 275 const char *eolian_type_enum_field_description_get(const Eolian_Enum_Type_Field *fl);
276 const Eolian_Expression *eolian_type_enum_field_value_get(const Eolian_Enum_Type_Field *fl); 276 const Eolian_Expression *eolian_type_enum_field_value_get(Eolian_Enum_Type_Field *fl, Eina_Bool force);
277 const char *eolian_type_enum_legacy_prefix_get(const Eolian_Type *tp); 277 const char *eolian_type_enum_legacy_prefix_get(const Eolian_Type *tp);
278 const char *eolian_type_description_get(const Eolian_Type *tp); 278 const char *eolian_type_description_get(const Eolian_Type *tp);
279 const char *eolian_type_file_get(const Eolian_Type *tp); 279 const char *eolian_type_file_get(const Eolian_Type *tp);
@@ -474,8 +474,8 @@ ffi.metatype("Eolian_Enum_Type_Field", {
474 return ffi.string(v) 474 return ffi.string(v)
475 end, 475 end,
476 476
477 value_get = function(self) 477 value_get = function(self, force)
478 local v = eolian.eolian_type_enum_field_value_get(self) 478 local v = eolian.eolian_type_enum_field_value_get(self, force and 1 or 0)
479 if v == nil then return nil end 479 if v == nil then return nil end
480 return v 480 return v
481 end 481 end
@@ -510,7 +510,7 @@ M.Type = ffi.metatype("Eolian_Type", {
510 end, 510 end,
511 511
512 enum_fields_get = function(self) 512 enum_fields_get = function(self)
513 return Ptr_Iterator("const Eolian_Enum_Type_Field*", 513 return Ptr_Iterator("Eolian_Enum_Type_Field*",
514 eolian.eolian_type_enum_fields_get(self)) 514 eolian.eolian_type_enum_fields_get(self))
515 end, 515 end,
516 516