q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=39add190a7ad4a7f69002fb28880b01ceb8f4fdf

commit 39add190a7ad4a7f69002fb28880b01ceb8f4fdf
Author: Daniel Kolesa <[email protected]>
Date:   Wed Oct 1 16:32:29 2014 +0100

    elua: register classes with their underscored name
---
 src/bin/elua/modules/lualian.lua | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/bin/elua/modules/lualian.lua b/src/bin/elua/modules/lualian.lua
index 8526d7c..eec3b5e 100644
--- a/src/bin/elua/modules/lualian.lua
+++ b/src/bin/elua/modules/lualian.lua
@@ -461,6 +461,9 @@ local File = Node:clone {
         dom:log(log.level.INFO, "Generating for file: " .. self.fname)
         dom:log(log.level.INFO, "  Class            : " .. kn)
 
+        local knu = kn:gsub("%.", "_")
+        local paru = par and ('"' .. par:gsub("%.", "_") .. '"') or "nil"
+
         s:write(([[
 -- EFL LuaJIT bindings: %s (class %s)
 -- For use with Elua; automatically generated, do not modify
@@ -480,11 +483,11 @@ local init = function()
     __lib = util.lib_load("%s")
     __class = __lib.%s_class_get()
     eo.class_register("%s", %s, __body, __class)
-]]):format(self.fname, kn, self.libname, ckls.prefix, kn,
-           par and ('"' .. par .. '"') or "nil"))
+]]):format(self.fname, kn, self.libname, ckls.prefix, knu, paru))
 
         if ckls.mixins then for i, v in ipairs(ckls.mixins) do
-            s:write(("    eo.class_mixin(\"%s\", \"%s\")\n"):format(kn, v))
+            s:write(("    eo.class_mixin(\"%s\", \"%s\")\n"):format(knu,
+                v:gsub("%.", "_")))
         end end
 
         s:write(([[

-- 


Reply via email to