Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
ygopro-2pick
Commits
1271e094
You need to sign in or sign up before continuing.
Commit
1271e094
authored
Dec 28, 2017
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rmpatch
parent
50f33353
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
24 deletions
+0
-24
premake/lua/lua.patch
premake/lua/lua.patch
+0
-24
No files found.
premake/lua/lua.patch
deleted
100644 → 0
View file @
50f33353
diff --git a/lua/lbaselib.c b/lua/lbaselib.c
index b5c6236..b2e864a 100644
--- a/lua/lbaselib.c
+++ b/lua/lbaselib.c
@@ -124,11 +124,14 @@
static int luaB_getmetatable (lua_State *L) {
static int luaB_setmetatable (lua_State *L) {
int t = lua_type(L, 2);
- luaL_checktype(L, 1, LUA_TTABLE);
- luaL_argcheck(L, t == LUA_TNIL || t == LUA_TTABLE, 2,
- "nil or table expected");
- if (luaL_getmetafield(L, 1, "__metatable") != LUA_TNIL)
- return luaL_error(L, "cannot change a protected metatable");
+ int nocheck = lua_toboolean(L, 3);
+ if (!nocheck) {
+ luaL_checktype(L, 1, LUA_TTABLE);
+ luaL_argcheck(L, t == LUA_TNIL || t == LUA_TTABLE, 2,
+ "nil or table expected");
+ if (luaL_getmetafield(L, 1, "__metatable") != LUA_TNIL)
+ return luaL_error(L, "cannot change a protected metatable");
+ }
lua_settop(L, 2);
lua_setmetatable(L, 1);
return 1;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment