summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-09-25 15:53:42 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2014-09-25 15:53:42 +0100
commitfc40591f1195da03766e0e97f3a6559648c80824 (patch)
tree05ba5451d9cbac1f4dc71df36a279c74416d4f18
parent8631212e454a26ddd51bdf9a2d6c9090fa23b36f (diff)
elua: update eolian bindings and generator
-rw-r--r--src/bin/elua/modules/lualian.lua22
-rw-r--r--src/bindings/luajit/eolian.lua13
2 files changed, 20 insertions, 15 deletions
diff --git a/src/bin/elua/modules/lualian.lua b/src/bin/elua/modules/lualian.lua
index d97616229e..3d2501c7bc 100644
--- a/src/bin/elua/modules/lualian.lua
+++ b/src/bin/elua/modules/lualian.lua
@@ -165,7 +165,7 @@ local Method = Node:clone {
165 local allocs = {} 165 local allocs = {}
166 proto.allocs = allocs 166 proto.allocs = allocs
167 167
168 proto.full_name = meth:full_c_name_get(self.parent_node.prefix) 168 proto.full_name = meth:full_c_name_get()
169 169
170 local dirs = eolian.parameter_dir 170 local dirs = eolian.parameter_dir
171 171
@@ -259,8 +259,7 @@ local Property = Method:clone {
259 local allocs = {} 259 local allocs = {}
260 proto.allocs = allocs 260 proto.allocs = allocs
261 261
262 proto.full_name = prop:full_c_name_get(self.parent_node.prefix) 262 proto.full_name = prop:full_c_name_get() .. proto.suffix
263 .. proto.suffix
264 263
265 local dirs = eolian.parameter_dir 264 local dirs = eolian.parameter_dir
266 265
@@ -330,19 +329,17 @@ local Property = Method:clone {
330} 329}
331 330
332local Event = Node:clone { 331local Event = Node:clone {
333 __ctor = function(self, ename, etype, edesc) 332 __ctor = function(self, ename, etype, edesc, ecname)
334 self.ename = ename 333 self.ename = ename
335 self.etype = etype 334 self.etype = etype
336 self.edesc = edesc 335 self.edesc = edesc
336 self.ecname = ecname
337 end, 337 end,
338 338
339 gen_ffi_name = function(self) 339 gen_ffi_name = function(self)
340 local ffin = self.cached_ffi_name 340 local ffin = self.cached_ffi_name
341 if ffin then return ffin end 341 if ffin then return ffin end
342 ffin = table.concat { 342 ffin = "_" .. self.ecname
343 "_", self.parent_node.klass:name_get():upper(), "_EVENT_",
344 self.ename:gsub("%W", "_"):upper()
345 }
346 self.cached_ffi_name = ffin 343 self.cached_ffi_name = ffin
347 return ffin 344 return ffin
348 end, 345 end,
@@ -621,7 +618,8 @@ local gen_contents = function(klass)
621 local evs = {} 618 local evs = {}
622 local events = klass:events_get():to_array() 619 local events = klass:events_get():to_array()
623 for i, v in ipairs(events) do 620 for i, v in ipairs(events) do
624 evs[#evs + 1] = Event(v:name_get(), v:type_get(), v:description_get()) 621 evs[#evs + 1] = Event(v:name_get(), v:type_get(), v:description_get(),
622 v:c_name_get())
625 end 623 end
626 return cnt, evs 624 return cnt, evs
627end 625end
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 037310aded..59317413ce 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -202,7 +202,7 @@ ffi.cdef [[
202 Eolian_Function_Type eolian_function_type_get(const Eolian_Function *function_id); 202 Eolian_Function_Type eolian_function_type_get(const Eolian_Function *function_id);
203 Eolian_Object_Scope eolian_function_scope_get(const Eolian_Function *function_id); 203 Eolian_Object_Scope eolian_function_scope_get(const Eolian_Function *function_id);
204 const char *eolian_function_name_get(const Eolian_Function *function_id); 204 const char *eolian_function_name_get(const Eolian_Function *function_id);
205 const char *eolian_function_full_c_name_get(const Eolian_Function *function_id, const char *prefix); 205 const char *eolian_function_full_c_name_get(const Eolian_Function *function_id);
206 const Eolian_Function *eolian_class_function_get_by_name(const Eolian_Class *klass, const char *func_name, Eolian_Function_Type f_type); 206 const Eolian_Function *eolian_class_function_get_by_name(const Eolian_Class *klass, const char *func_name, Eolian_Function_Type f_type);
207 const char *eolian_function_legacy_get(const Eolian_Function *function_id, Eolian_Function_Type f_type); 207 const char *eolian_function_legacy_get(const Eolian_Function *function_id, Eolian_Function_Type f_type);
208 const char *eolian_function_description_get(const Eolian_Function *function_id, Eolian_Function_Type f_type); 208 const char *eolian_function_description_get(const Eolian_Function *function_id, Eolian_Function_Type f_type);
@@ -246,6 +246,7 @@ ffi.cdef [[
246 const Eolian_Type *eolian_event_type_get(const Eolian_Event *event); 246 const Eolian_Type *eolian_event_type_get(const Eolian_Event *event);
247 const char *eolian_event_description_get(const Eolian_Event *event); 247 const char *eolian_event_description_get(const Eolian_Event *event);
248 Eolian_Object_Scope eolian_event_scope_get(const Eolian_Event *event); 248 Eolian_Object_Scope eolian_event_scope_get(const Eolian_Event *event);
249 const char *eolian_event_c_name_get(const Eolian_Event *event);
249 Eina_Bool eolian_class_ctor_enable_get(const Eolian_Class *klass); 250 Eina_Bool eolian_class_ctor_enable_get(const Eolian_Class *klass);
250 Eina_Bool eolian_class_dtor_enable_get(const Eolian_Class *klass); 251 Eina_Bool eolian_class_dtor_enable_get(const Eolian_Class *klass);
251 const Eolian_Type *eolian_type_alias_get_by_name(const char *name); 252 const Eolian_Type *eolian_type_alias_get_by_name(const char *name);
@@ -608,8 +609,8 @@ M.Function = ffi.metatype("Eolian_Function", {
608 return ffi.string(v) 609 return ffi.string(v)
609 end, 610 end,
610 611
611 full_c_name_get = function(self, prefix) 612 full_c_name_get = function(self)
612 local v = eolian.eolian_function_full_c_name_get(self, prefix) 613 local v = eolian.eolian_function_full_c_name_get(self)
613 if v == nil then return nil end 614 if v == nil then return nil end
614 return ffi_stringshare(v) 615 return ffi_stringshare(v)
615 end, 616 end,
@@ -829,6 +830,12 @@ ffi.metatype("Eolian_Event", {
829 830
830 scope_get = function(self) 831 scope_get = function(self)
831 return eolian.eolian_event_scope_get(self) 832 return eolian.eolian_event_scope_get(self)
833 end,
834
835 c_name_get = function(self)
836 local v = eolian.eolian_event_c_name_get(self)
837 if v == nil then return nil end
838 return ffi_stringshare(v)
832 end 839 end
833 } 840 }
834}) 841})