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
602f1bb2
Commit
602f1bb2
authored
Oct 01, 2017
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testlua
parent
ab053b5a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
appveyor.yml
appveyor.yml
+3
-0
premake/lua/lua.patch
premake/lua/lua.patch
+24
-0
No files found.
appveyor.yml
View file @
602f1bb2
...
@@ -26,6 +26,9 @@ install:
...
@@ -26,6 +26,9 @@ install:
# let premake happy
# let premake happy
-
xcopy /E premake\* .
-
xcopy /E premake\* .
# patch lua
-
patch -p0 < lua.patch
# premake
# premake
-
premake5 vs2015
-
premake5 vs2015
...
...
premake/lua/lua.patch
0 → 100644
View file @
602f1bb2
diff --git a/lua/lbaselib.c b/lua/lbaselib.c
index 861823d..3eebb0f 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