summaryrefslogtreecommitdiff
path: root/src/bindings
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2016-06-08 15:49:09 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2016-06-08 15:49:09 +0100
commitb87c4f6de82065b22c2dab32acf27afcbd3824cb (patch)
treed8b4e731c6ef42d94bd15263a495b027aac555f4 /src/bindings
parent08e189805d30c45a56e77e3c4cc222ead8f4ed70 (diff)
downloadefl-b87c4f6de82065b22c2dab32acf27afcbd3824cb.tar.gz
eolian: refine the ref system to suit more cases
Now references are first class (but still restricted to one level). Unlike pointers they only mark the type instead of introducing a whole new type.
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/luajit/eolian.lua16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 077712cbf8..b31f445afc 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -41,8 +41,7 @@ ffi.cdef [[
{
EOLIAN_IN_PARAM = 0,
EOLIAN_OUT_PARAM,
- EOLIAN_INOUT_PARAM,
- EOLIAN_REF_PARAM
+ EOLIAN_INOUT_PARAM
} Eolian_Parameter_Dir;
typedef enum
@@ -281,7 +280,6 @@ ffi.cdef [[
const char *eolian_typedecl_struct_field_name_get(const Eolian_Struct_Type_Field *fl);
const Eolian_Documentation *eolian_typedecl_struct_field_documentation_get(const Eolian_Struct_Type_Field *fl);
const Eolian_Type *eolian_typedecl_struct_field_type_get(const Eolian_Struct_Type_Field *fl);
- Eina_Bool eolian_typedecl_struct_field_is_ref(const Eolian_Struct_Type_Field *fl);
Eina_Iterator *eolian_typedecl_enum_fields_get(const Eolian_Typedecl *tp);
const Eolian_Enum_Type_Field *eolian_typedecl_enum_field_get(const Eolian_Typedecl *tp, const char *field);
const char *eolian_typedecl_enum_field_name_get(const Eolian_Enum_Type_Field *fl);
@@ -304,6 +302,7 @@ ffi.cdef [[
const Eolian_Class *eolian_type_class_get(const Eolian_Type *tp);
Eina_Bool eolian_type_is_own(const Eolian_Type *tp);
Eina_Bool eolian_type_is_const(const Eolian_Type *tp);
+ Eina_Bool eolian_type_is_ref(const Eolian_Type *tp);
Eina_Bool eolian_typedecl_is_extern(const Eolian_Typedecl *tp);
@@ -484,10 +483,6 @@ ffi.metatype("Eolian_Struct_Type_Field", {
local v = eolian.eolian_typedecl_struct_field_type_get(self)
if v == nil then return nil end
return v
- end,
-
- is_ref = function(self)
- return eolian.eolian_typedecl_struct_field_is_ref(self) ~= 0
end
}
})
@@ -662,6 +657,10 @@ M.Type = ffi.metatype("Eolian_Type", {
return eolian.eolian_type_is_const(self) ~= 0
end,
+ is_ref = function(self)
+ return eolian.eolian_type_is_ref(self) ~= 0
+ end,
+
c_type_get = function(self)
local v = eolian.eolian_type_c_type_get(self)
if v == nil then return nil end
@@ -806,8 +805,7 @@ M.Function = ffi.metatype("Eolian_Function", {
M.parameter_dir = {
IN = 0,
OUT = 1,
- INOUT = 2,
- REF = 3
+ INOUT = 2
}
ffi.metatype("Eolian_Function_Parameter", {