mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Rename love::luasocket::__open to love::luasocket::preload
This commit is contained in:
@@ -38,15 +38,6 @@ extern "C" {
|
||||
#include "libluasocket/tp.lua.h"
|
||||
#include "libluasocket/url.lua.h"
|
||||
|
||||
// Quick macro for adding functions to
|
||||
// the preloder.
|
||||
#define PRELOAD(name, function) \
|
||||
lua_getglobal(L, "package"); \
|
||||
lua_getfield(L, -1, "preload"); \
|
||||
lua_pushcfunction(L, function); \
|
||||
lua_setfield(L, -2, name); \
|
||||
lua_pop(L, 2);
|
||||
|
||||
static void preload(lua_State* L, const char* name, lua_CFunction func)
|
||||
{
|
||||
lua_getglobal(L, "package");
|
||||
@@ -88,7 +79,7 @@ namespace love
|
||||
namespace luasocket
|
||||
{
|
||||
|
||||
int __open(lua_State * L)
|
||||
int preload(lua_State * L)
|
||||
{
|
||||
|
||||
// Preload code from LuaSocket.
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace love
|
||||
namespace luasocket
|
||||
{
|
||||
|
||||
int __open(lua_State * L);
|
||||
int preload(lua_State * L);
|
||||
|
||||
} // luasocket
|
||||
} // love
|
||||
|
||||
Reference in New Issue
Block a user