summaryrefslogtreecommitdiff
path: root/src/bindings
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2017-01-16 15:51:11 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2017-01-16 15:55:06 +0100
commit35c5e892695ad4e2169003c0dd2a00db8c1679a4 (patch)
tree0fec985aa08f720b30fa0fbab5181fef6cdb156c /src/bindings
parentfbad285eca8bde68de0158395b346bdac25dc3ec (diff)
eolian: remove/add APIs and clean up implements system
As there is no need to have separate is_auto, is_empty and is_pure_virtual for functions and implements (each function has its own base implement by default) I removed the function ones. Instead, I added a way to retrieve a function's base implement so that you can instead do the checks on the implement even when you only have the function. I also moved base implement build directly into the parser instead of the database filler. That allows for significant cleanup. I also removed distinction of implement pointers in Eolian_Function for get and set as implements now always contain an entire thing so the pointer was always the same anyway. Things should still behave more or less the same, but ordering of generated functions has changed because ordering of implements has changed.
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/luajit/eolian.lua18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index fb8be57..d96b7e6 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -250,9 +250,7 @@ ffi.cdef [[
250 const Eolian_Function *eolian_class_function_get_by_name(const Eolian_Class *klass, const char *func_name, Eolian_Function_Type f_type); 250 const Eolian_Function *eolian_class_function_get_by_name(const Eolian_Class *klass, const char *func_name, Eolian_Function_Type f_type);
251 const char *eolian_function_legacy_get(const Eolian_Function *function_id, Eolian_Function_Type f_type); 251 const char *eolian_function_legacy_get(const Eolian_Function *function_id, Eolian_Function_Type f_type);
252 const Eolian_Documentation *eolian_function_documentation_get(const Eolian_Function *function_id, Eolian_Function_Type f_type); 252 const Eolian_Documentation *eolian_function_documentation_get(const Eolian_Function *function_id, Eolian_Function_Type f_type);
253 Eina_Bool eolian_function_is_pure_virtual(const Eolian_Function *function_id, Eolian_Function_Type f_type); 253 const Eolian_Implement *eolian_function_implement_get(const Eolian_Function *function_id);
254 Eina_Bool eolian_function_is_auto(const Eolian_Function *function_id, Eolian_Function_Type f_type);
255 Eina_Bool eolian_function_is_empty(const Eolian_Function *function_id, Eolian_Function_Type f_type);
256 Eina_Bool eolian_function_is_legacy_only(const Eolian_Function *function_id, Eolian_Function_Type ftype); 254 Eina_Bool eolian_function_is_legacy_only(const Eolian_Function *function_id, Eolian_Function_Type ftype);
257 Eina_Bool eolian_function_is_class(const Eolian_Function *function_id); 255 Eina_Bool eolian_function_is_class(const Eolian_Function *function_id);
258 Eina_Bool eolian_function_is_c_only(const Eolian_Function *function_id); 256 Eina_Bool eolian_function_is_c_only(const Eolian_Function *function_id);
@@ -783,16 +781,10 @@ M.Function = ffi.metatype("Eolian_Function", {
783 return v 781 return v
784 end, 782 end,
785 783
786 is_pure_virtual = function(self, ftype) 784 implement_get = function(self)
787 return eolian.eolian_function_is_pure_virtual(self, ftype) ~= 0 785 local v = eolian.eolian_function_implement_get(self)
788 end, 786 if v == nil then return nil end
789 787 return v
790 is_auto = function(self, ftype)
791 return eolian.eolian_function_is_auto(self, ftype) ~= 0
792 end,
793
794 is_empty = function(self, ftype)
795 return eolian.eolian_function_is_empty(self, ftype) ~= 0
796 end, 788 end,
797 789
798 is_legacy_only = function(self, ftype) 790 is_legacy_only = function(self, ftype)