elua: support is_c_only in lualian
authorDaniel Kolesa <d.kolesa@samsung.com>
Wed, 3 Dec 2014 15:27:38 +0000 (15:27 +0000)
committerDaniel Kolesa <d.kolesa@samsung.com>
Wed, 3 Dec 2014 15:27:38 +0000 (15:27 +0000)
src/bin/elua/modules/lualian.lua
src/bindings/luajit/eolian.lua

index 8d77094056f2d0c034a933812f1332476f7309e7..85208e17dbcb1f1dbb8655785a6afab5ee3e0317 100644 (file)
@@ -604,7 +604,7 @@ local gen_contents = function(klass)
     -- first try properties
     local props = klass:functions_get(ft.PROPERTY):to_array()
     for i, v in ipairs(props) do
-        if v:scope_get() == eolian.object_scope.PUBLIC then
+        if v:scope_get() == eolian.object_scope.PUBLIC and not v:is_c_only() then
             local ftype  = v:type_get()
             local fread  = (ftype == ft.PROPERTY or ftype == ft.PROP_GET)
             local fwrite = (ftype == ft.PROPERTY or ftype == ft.PROP_SET)
@@ -619,7 +619,7 @@ local gen_contents = function(klass)
     -- then methods
     local meths = klass:functions_get(ft.METHOD):to_array()
     for i, v in ipairs(meths) do
-        if v:scope_get() == eolian.object_scope.PUBLIC then
+        if v:scope_get() == eolian.object_scope.PUBLIC and not v:is_c_only() then
             cnt[#cnt + 1] = Method(v)
         end
     end
index d3c76aacc7c3f0fe2a77b77855545961d6d811a5..283f6f97b08eb5ac19ddde95e714ec081abd301d 100644 (file)
@@ -215,6 +215,7 @@ ffi.cdef [[
     Eina_Bool eolian_function_is_empty(const Eolian_Function *function_id, Eolian_Function_Type f_type);
     Eina_Bool eolian_function_is_legacy_only(const Eolian_Function *function_id, Eolian_Function_Type ftype);
     Eina_Bool eolian_function_is_class(const Eolian_Function *function_id);
+    Eina_Bool eolian_function_is_c_only(const Eolian_Function *function_id);
     const Eolian_Function_Parameter *eolian_function_parameter_get_by_name(const Eolian_Function *function_id, const char *param_name);
     Eina_Iterator *eolian_property_keys_get(const Eolian_Function *foo_id);
     Eina_Iterator *eolian_property_values_get(const Eolian_Function *foo_id);
@@ -669,6 +670,10 @@ M.Function = ffi.metatype("Eolian_Function", {
             return eolian.eolian_function_is_class(self) ~= 0
         end,
 
+        is_c_only = function(self)
+            return eolian.eolian_function_is_c_only(self) ~= 0
+        end,
+
         parameter_get_by_name = function(self, pname)
             local v = eolian.eolian_function_parameter_get_by_name(self, pname)
             if v == nil then return nil end