Skip to content

Commit 201f05d

Browse files
committed
Move yield buffer metatable setup to lstrlib's open func
Not having it there was causing issues in the server, where we don't actually call `luaL_openlibs()`
1 parent b4ca4c6 commit 201f05d

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

VM/src/linit.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ void luaL_openlibs(lua_State* L)
3030
lua_pushstring(L, lib->name);
3131
lua_call(L, 1, 0);
3232
}
33-
34-
// ServerLua: Register the UTAG_STRBUF GC destructor.
35-
luaYB_setup(L);
3633
}
3734

3835
void luaL_sandbox(lua_State* L)

VM/src/lstrlib.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
// ServerLua: yieldable pattern-matching replacements.
99
#include "lyieldstrlib.h"
10+
#include "lstrbuf.h"
1011

1112
#include <ctype.h>
1213
#include <string.h>
@@ -1714,5 +1715,8 @@ int luaopen_string(lua_State* L)
17141715

17151716
createmetatable(L);
17161717

1718+
// ServerLua: Register the UTAG_STRBUF GC destructor.
1719+
luaYB_setup(L);
1720+
17171721
return 1;
17181722
}

0 commit comments

Comments
 (0)