From 10dae68ead959518650884a91bc2ca75a0afada0 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Fri, 16 May 2014 11:55:16 +1000 Subject: Skang moduleBegin() stuffs the module in the C registry, so no one has to do this now. NOTE - It uses a Lua debug function for this. --- lib/skang.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/skang.lua') diff --git a/lib/skang.lua b/lib/skang.lua index 0f91e44..394c3f8 100644 --- a/lib/skang.lua +++ b/lib/skang.lua @@ -95,6 +95,7 @@ moduleBegin = function (name, author, copyright, version, timestamp, skin, isLua -- Returning it at the end does the same thing. -- This is so that we can have all the module stuff at the top, in this function. -- Should do this before any further require(), so that circular references don't blow out. + debug.getregistry()[name] = _M -- Stuff the result in the C registry. -- Save the callers environment. local savedEnvironment -- cgit v1.1