mirror of
https://github.com/love2d/love.git
synced 2026-08-12 16:40:57 +02:00
Modules now reside in Lua and are treated (almost) like normal objects.
Also added a way of getting a pointer to abstract module instances internally.
This commit is contained in:
@@ -266,9 +266,15 @@ namespace audio
|
||||
if(instance == 0)
|
||||
return luaL_error(L, "Could not open any audio module.");
|
||||
|
||||
luax_register_gc(L, instance);
|
||||
|
||||
return luax_register_module(L, functions, types, 0, "audio");
|
||||
WrappedModule w;
|
||||
w.module = instance;
|
||||
w.name = "audio";
|
||||
w.flags = MODULE_T;
|
||||
w.functions = functions;
|
||||
w.types = types;
|
||||
w.constants = 0;
|
||||
|
||||
return luax_register_module(L, w);
|
||||
}
|
||||
|
||||
} // audio
|
||||
|
||||
Reference in New Issue
Block a user