MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / lua_functor

Method lua_functor

modules/engine/basic_meta/lua/luabind.py:37–43  ·  view source on GitHub ↗
(self, st, function)

Source from the content-addressed store, hash-verified

35 return name.replace("const", "").replace("*", "").replace("&", "").replace("::", "_").strip()
36
37 def lua_functor(self, st, function):
38 ps = [self.lua_param(name, param) for name, param in vars(function.parameters).items()]
39 if(st != ""):
40 ps.insert(0, st)
41 plist = ", ".join(ps)
42 ret = " -> " + (self.lua_type(function.retType) if function.retType != "void" else "nil")
43 return "(%s)"%plist + ret
44
45 def lua_param(self, name, param):
46 if param.isCallback:

Callers 1

lua_paramMethod · 0.95

Calls 5

lua_paramMethod · 0.95
lua_typeMethod · 0.95
itemsMethod · 0.80
insertMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected