summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-09-26 13:10:03 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2014-09-26 13:10:03 +0100
commit05d4805f39ce655ed90e4eaad6d1f1079942c330 (patch)
tree00c606794552abb336c2cf5c9b9153bee6fc2b6c
parentf15f875fa90cd66955ad16095a49e630d80093b0 (diff)
elua: remove Constructor/Default_Constructor from lualian (obsolete)
-rw-r--r--src/bin/elua/modules/lualian.lua56
1 files changed, 0 insertions, 56 deletions
diff --git a/src/bin/elua/modules/lualian.lua b/src/bin/elua/modules/lualian.lua
index 3d2501c7bc..ebb6856ef8 100644
--- a/src/bin/elua/modules/lualian.lua
+++ b/src/bin/elua/modules/lualian.lua
@@ -358,62 +358,6 @@ local Event = Node:clone {
358 end 358 end
359} 359}
360 360
361local Constructor = Method:clone {
362 generate = function(self, s, last)
363 local proto = self:gen_proto()
364 local name = proto.name
365 local defctor = name == "constructor"
366 table.insert(proto.args, 2, "parent")
367
368 s:write(" __define_properties = function(self, proto)\n")
369 self.parent_node:gen_ctor(s)
370 s:write(" proto.__define_properties(self, proto.__proto)\n")
371 s:write(" end,\n\n")
372
373 s:write(" ", defctor and "__ctor" or name, " = function(",
374 table.concat(proto.args, ", "), ")\n")
375 if not defctor then
376 s:write(" self = self:clone()\n")
377 end
378 s:write(" self:__define_properties(self.__proto.__proto)\n")
379 for i, v in ipairs(proto.allocs) do
380 s:write(" local ", v[2], " = ffi.new(\"", v[1], "[1]\")\n")
381 end
382 local genv = (proto.ret_type ~= "void")
383 local cvargs = table.concat(proto.vargs, ", ")
384 if cvargs ~= "" then cvargs = ", " .. cvargs end
385 s:write(" ", genv and "local v = " or "", "eo.__ctor_common(",
386 "self, __class, parent, __lib.", proto.full_name, cvargs, ")\n")
387 if not defctor then
388 table.insert(proto.rets, 1, "self")
389 end
390 if #proto.rets > 0 then
391 s:write(" return ", table.concat(proto.rets, ", "), "\n")
392 end
393 s:write(" end", last and "" or ",", last and "\n" or "\n\n")
394 end
395}
396
397local Default_Constructor = Node:clone {
398 generate = function(self, s, last)
399 s:write(" __define_properties = function(self, proto)\n")
400 self.parent_node:gen_ctor(s)
401 s:write(" proto.__define_properties(self, proto.__proto)\n")
402 s:write(" end,\n\n")
403
404 s:write( " __ctor = function(self, parent)\n")
405 s:write(" self:__define_properties(self.__proto.__proto)\n")
406 s:write(" eo.__ctor_common(self, __class, parent)\n")
407 s:write(" end", last and "" or ",", last and "\n" or "\n\n")
408 end,
409
410 gen_ffi = function(self, s)
411 end,
412
413 gen_ctor = function(self)
414 end
415}
416
417local Mixin = Node:clone { 361local Mixin = Node:clone {
418 __ctor = function(self, klass, ch, evs) 362 __ctor = function(self, klass, ch, evs)
419 self.klass = klass 363 self.klass = klass