Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
List
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
fallenstardust
YGOMobile
Commits
66d9a533
Commit
66d9a533
authored
Aug 12, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bump lua to 5.3.5
parent
67dccc3f
Changes
61
Hide whitespace changes
Inline
Side-by-side
Showing
61 changed files
with
145 additions
and
89 deletions
+145
-89
Classes/lua/Makefile
Classes/lua/Makefile
+2
-2
Classes/lua/lapi.c
Classes/lua/lapi.c
+4
-3
Classes/lua/lapi.h
Classes/lua/lapi.h
+1
-1
Classes/lua/lauxlib.c
Classes/lua/lauxlib.c
+1
-1
Classes/lua/lauxlib.h
Classes/lua/lauxlib.h
+1
-1
Classes/lua/lbaselib.c
Classes/lua/lbaselib.c
+1
-1
Classes/lua/lbitlib.c
Classes/lua/lbitlib.c
+1
-1
Classes/lua/lcode.c
Classes/lua/lcode.c
+1
-1
Classes/lua/lcode.h
Classes/lua/lcode.h
+1
-1
Classes/lua/lcorolib.c
Classes/lua/lcorolib.c
+1
-1
Classes/lua/lctype.c
Classes/lua/lctype.c
+1
-1
Classes/lua/lctype.h
Classes/lua/lctype.h
+1
-1
Classes/lua/ldblib.c
Classes/lua/ldblib.c
+1
-1
Classes/lua/ldebug.c
Classes/lua/ldebug.c
+2
-1
Classes/lua/ldebug.h
Classes/lua/ldebug.h
+1
-1
Classes/lua/ldo.c
Classes/lua/ldo.c
+1
-1
Classes/lua/ldo.h
Classes/lua/ldo.h
+1
-1
Classes/lua/ldump.c
Classes/lua/ldump.c
+1
-1
Classes/lua/lfunc.c
Classes/lua/lfunc.c
+1
-1
Classes/lua/lfunc.h
Classes/lua/lfunc.h
+1
-1
Classes/lua/lgc.c
Classes/lua/lgc.c
+3
-2
Classes/lua/lgc.h
Classes/lua/lgc.h
+1
-1
Classes/lua/linit.c
Classes/lua/linit.c
+1
-1
Classes/lua/liolib.c
Classes/lua/liolib.c
+9
-4
Classes/lua/llex.c
Classes/lua/llex.c
+1
-1
Classes/lua/llex.h
Classes/lua/llex.h
+1
-1
Classes/lua/llimits.h
Classes/lua/llimits.h
+1
-1
Classes/lua/lmathlib.c
Classes/lua/lmathlib.c
+1
-1
Classes/lua/lmem.c
Classes/lua/lmem.c
+1
-1
Classes/lua/lmem.h
Classes/lua/lmem.h
+1
-1
Classes/lua/loadlib.c
Classes/lua/loadlib.c
+1
-1
Classes/lua/lobject.c
Classes/lua/lobject.c
+3
-2
Classes/lua/lobject.h
Classes/lua/lobject.h
+1
-1
Classes/lua/lopcodes.c
Classes/lua/lopcodes.c
+1
-1
Classes/lua/lopcodes.h
Classes/lua/lopcodes.h
+1
-1
Classes/lua/loslib.c
Classes/lua/loslib.c
+5
-3
Classes/lua/lparser.c
Classes/lua/lparser.c
+2
-2
Classes/lua/lparser.h
Classes/lua/lparser.h
+1
-1
Classes/lua/lprefix.h
Classes/lua/lprefix.h
+1
-1
Classes/lua/lstate.c
Classes/lua/lstate.c
+1
-1
Classes/lua/lstate.h
Classes/lua/lstate.h
+19
-1
Classes/lua/lstring.c
Classes/lua/lstring.c
+1
-1
Classes/lua/lstring.h
Classes/lua/lstring.h
+1
-1
Classes/lua/lstrlib.c
Classes/lua/lstrlib.c
+4
-4
Classes/lua/ltable.c
Classes/lua/ltable.c
+27
-8
Classes/lua/ltable.h
Classes/lua/ltable.h
+2
-2
Classes/lua/ltablib.c
Classes/lua/ltablib.c
+1
-1
Classes/lua/ltm.c
Classes/lua/ltm.c
+1
-1
Classes/lua/ltm.h
Classes/lua/ltm.h
+1
-1
Classes/lua/lua.c
Classes/lua/lua.c
+2
-2
Classes/lua/lua.h
Classes/lua/lua.h
+4
-4
Classes/lua/luac.c
Classes/lua/luac.c
+3
-2
Classes/lua/luaconf.h
Classes/lua/luaconf.h
+8
-1
Classes/lua/lualib.h
Classes/lua/lualib.h
+1
-1
Classes/lua/lundump.c
Classes/lua/lundump.c
+1
-1
Classes/lua/lundump.h
Classes/lua/lundump.h
+1
-1
Classes/lua/lutf8lib.c
Classes/lua/lutf8lib.c
+2
-2
Classes/lua/lvm.c
Classes/lua/lvm.c
+1
-1
Classes/lua/lvm.h
Classes/lua/lvm.h
+1
-1
Classes/lua/lzio.c
Classes/lua/lzio.c
+1
-1
Classes/lua/lzio.h
Classes/lua/lzio.h
+1
-1
No files found.
Classes/lua/Makefile
View file @
66d9a533
...
@@ -102,7 +102,7 @@ c89:
...
@@ -102,7 +102,7 @@ c89:
freebsd
:
freebsd
:
$(MAKE)
$(ALL)
SYSCFLAGS
=
"-DLUA_USE_LINUX
"
SYSLIBS
=
"-Wl,-E -lreadline
"
$(MAKE)
$(ALL)
SYSCFLAGS
=
"-DLUA_USE_LINUX
-DLUA_USE_READLINE -I/usr/include/edit"
SYSLIBS
=
"-Wl,-E -ledit"
CC
=
"cc
"
generic
:
$(ALL)
generic
:
$(ALL)
...
@@ -110,7 +110,7 @@ linux:
...
@@ -110,7 +110,7 @@ linux:
$(MAKE)
$(ALL)
SYSCFLAGS
=
"-DLUA_USE_LINUX"
SYSLIBS
=
"-Wl,-E -ldl -lreadline"
$(MAKE)
$(ALL)
SYSCFLAGS
=
"-DLUA_USE_LINUX"
SYSLIBS
=
"-Wl,-E -ldl -lreadline"
macosx
:
macosx
:
$(MAKE)
$(ALL)
SYSCFLAGS
=
"-DLUA_USE_MACOSX"
SYSLIBS
=
"-lreadline"
CC
=
cc
$(MAKE)
$(ALL)
SYSCFLAGS
=
"-DLUA_USE_MACOSX"
SYSLIBS
=
"-lreadline"
mingw
:
mingw
:
$(MAKE)
"LUA_A=lua53.dll"
"LUA_T=lua.exe"
\
$(MAKE)
"LUA_A=lua53.dll"
"LUA_T=lua.exe"
\
...
...
Classes/lua/lapi.c
View file @
66d9a533
/*
/*
** $Id: lapi.c,v 2.259
2016/02/29 14:27:14
roberto Exp $
** $Id: lapi.c,v 2.259
.1.2 2017/12/06 18:35:12
roberto Exp $
** Lua API
** Lua API
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
@@ -533,6 +533,7 @@ LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n) {
...
@@ -533,6 +533,7 @@ LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n) {
lua_lock
(
L
);
lua_lock
(
L
);
if
(
n
==
0
)
{
if
(
n
==
0
)
{
setfvalue
(
L
->
top
,
fn
);
setfvalue
(
L
->
top
,
fn
);
api_incr_top
(
L
);
}
}
else
{
else
{
CClosure
*
cl
;
CClosure
*
cl
;
...
@@ -546,9 +547,9 @@ LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n) {
...
@@ -546,9 +547,9 @@ LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n) {
/* does not need barrier because closure is white */
/* does not need barrier because closure is white */
}
}
setclCvalue
(
L
,
L
->
top
,
cl
);
setclCvalue
(
L
,
L
->
top
,
cl
);
api_incr_top
(
L
);
luaC_checkGC
(
L
);
}
}
api_incr_top
(
L
);
luaC_checkGC
(
L
);
lua_unlock
(
L
);
lua_unlock
(
L
);
}
}
...
...
Classes/lua/lapi.h
View file @
66d9a533
/*
/*
** $Id: lapi.h,v 2.9
2015/03/06 19:49:50
roberto Exp $
** $Id: lapi.h,v 2.9
.1.1 2017/04/19 17:20:42
roberto Exp $
** Auxiliary functions from Lua API
** Auxiliary functions from Lua API
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lauxlib.c
View file @
66d9a533
/*
/*
** $Id: lauxlib.c,v 1.289
2016/12/20 18:37:00
roberto Exp $
** $Id: lauxlib.c,v 1.289
.1.1 2017/04/19 17:20:42
roberto Exp $
** Auxiliary functions for building Lua libraries
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lauxlib.h
View file @
66d9a533
/*
/*
** $Id: lauxlib.h,v 1.131
2016/12/06 14:54:31
roberto Exp $
** $Id: lauxlib.h,v 1.131
.1.1 2017/04/19 17:20:42
roberto Exp $
** Auxiliary functions for building Lua libraries
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lbaselib.c
View file @
66d9a533
/*
/*
** $Id: lbaselib.c,v 1.314
2016/09/05 19:06
:34 roberto Exp $
** $Id: lbaselib.c,v 1.314
.1.1 2017/04/19 17:39
:34 roberto Exp $
** Basic library
** Basic library
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lbitlib.c
View file @
66d9a533
/*
/*
** $Id: lbitlib.c,v 1.30
2015/11/11 19:08:09
roberto Exp $
** $Id: lbitlib.c,v 1.30
.1.1 2017/04/19 17:20:42
roberto Exp $
** Standard library for bitwise operations
** Standard library for bitwise operations
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lcode.c
View file @
66d9a533
/*
/*
** $Id: lcode.c,v 2.112
2016/12/22 13:08:50
roberto Exp $
** $Id: lcode.c,v 2.112
.1.1 2017/04/19 17:20:42
roberto Exp $
** Code generator for Lua
** Code generator for Lua
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lcode.h
View file @
66d9a533
/*
/*
** $Id: lcode.h,v 1.64
2016/01/05 16:22:37
roberto Exp $
** $Id: lcode.h,v 1.64
.1.1 2017/04/19 17:20:42
roberto Exp $
** Code generator for Lua
** Code generator for Lua
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lcorolib.c
View file @
66d9a533
/*
/*
** $Id: lcorolib.c,v 1.10
2016/04/11 19:19:55
roberto Exp $
** $Id: lcorolib.c,v 1.10
.1.1 2017/04/19 17:20:42
roberto Exp $
** Coroutine Library
** Coroutine Library
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lctype.c
View file @
66d9a533
/*
/*
** $Id: lctype.c,v 1.12
2014/11/02 19:19:04
roberto Exp $
** $Id: lctype.c,v 1.12
.1.1 2017/04/19 17:20:42
roberto Exp $
** 'ctype' functions for Lua
** 'ctype' functions for Lua
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lctype.h
View file @
66d9a533
/*
/*
** $Id: lctype.h,v 1.12
2011/07/15 12:50:29
roberto Exp $
** $Id: lctype.h,v 1.12
.1.1 2013/04/12 18:48:47
roberto Exp $
** 'ctype' functions for Lua
** 'ctype' functions for Lua
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/ldblib.c
View file @
66d9a533
/*
/*
** $Id: ldblib.c,v 1.151
2015/11/23 11:29:43
roberto Exp $
** $Id: ldblib.c,v 1.151
.1.1 2017/04/19 17:20:42
roberto Exp $
** Interface from Lua to its debug API
** Interface from Lua to its debug API
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/ldebug.c
View file @
66d9a533
/*
/*
** $Id: ldebug.c,v 2.121
2016/10/19 12:32:1
0 roberto Exp $
** $Id: ldebug.c,v 2.121
.1.2 2017/07/10 17:21:5
0 roberto Exp $
** Debug Interface
** Debug Interface
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
@@ -653,6 +653,7 @@ l_noret luaG_runerror (lua_State *L, const char *fmt, ...) {
...
@@ -653,6 +653,7 @@ l_noret luaG_runerror (lua_State *L, const char *fmt, ...) {
CallInfo
*
ci
=
L
->
ci
;
CallInfo
*
ci
=
L
->
ci
;
const
char
*
msg
;
const
char
*
msg
;
va_list
argp
;
va_list
argp
;
luaC_checkGC
(
L
);
/* error message uses memory */
va_start
(
argp
,
fmt
);
va_start
(
argp
,
fmt
);
msg
=
luaO_pushvfstring
(
L
,
fmt
,
argp
);
/* format message */
msg
=
luaO_pushvfstring
(
L
,
fmt
,
argp
);
/* format message */
va_end
(
argp
);
va_end
(
argp
);
...
...
Classes/lua/ldebug.h
View file @
66d9a533
/*
/*
** $Id: ldebug.h,v 2.14
2015/05/22 17:45:56
roberto Exp $
** $Id: ldebug.h,v 2.14
.1.1 2017/04/19 17:20:42
roberto Exp $
** Auxiliary functions from Debug Interface module
** Auxiliary functions from Debug Interface module
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/ldo.c
View file @
66d9a533
/*
/*
** $Id: ldo.c,v 2.157
2016/12/13 15:52:21
roberto Exp $
** $Id: ldo.c,v 2.157
.1.1 2017/04/19 17:20:42
roberto Exp $
** Stack and Call structure of Lua
** Stack and Call structure of Lua
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/ldo.h
View file @
66d9a533
/*
/*
** $Id: ldo.h,v 2.29
2015/12/21 13:02:14
roberto Exp $
** $Id: ldo.h,v 2.29
.1.1 2017/04/19 17:20:42
roberto Exp $
** Stack and Call structure of Lua
** Stack and Call structure of Lua
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/ldump.c
View file @
66d9a533
/*
/*
** $Id: ldump.c,v 2.37
2015/10/08 15:53:49
roberto Exp $
** $Id: ldump.c,v 2.37
.1.1 2017/04/19 17:20:42
roberto Exp $
** save precompiled Lua chunks
** save precompiled Lua chunks
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lfunc.c
View file @
66d9a533
/*
/*
** $Id: lfunc.c,v 2.45
2014/11/02 19:19:0
4 roberto Exp $
** $Id: lfunc.c,v 2.45
.1.1 2017/04/19 17:39:3
4 roberto Exp $
** Auxiliary functions to manipulate prototypes and closures
** Auxiliary functions to manipulate prototypes and closures
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lfunc.h
View file @
66d9a533
/*
/*
** $Id: lfunc.h,v 2.15
2015/01/13 15:49:11
roberto Exp $
** $Id: lfunc.h,v 2.15
.1.1 2017/04/19 17:39:34
roberto Exp $
** Auxiliary functions to manipulate prototypes and closures
** Auxiliary functions to manipulate prototypes and closures
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lgc.c
View file @
66d9a533
/*
/*
** $Id: lgc.c,v 2.215
2016/12/22 13:08:50
roberto Exp $
** $Id: lgc.c,v 2.215
.1.2 2017/08/31 16:15:27
roberto Exp $
** Garbage Collector
** Garbage Collector
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
@@ -643,8 +643,9 @@ static void clearkeys (global_State *g, GCObject *l, GCObject *f) {
...
@@ -643,8 +643,9 @@ static void clearkeys (global_State *g, GCObject *l, GCObject *f) {
for
(
n
=
gnode
(
h
,
0
);
n
<
limit
;
n
++
)
{
for
(
n
=
gnode
(
h
,
0
);
n
<
limit
;
n
++
)
{
if
(
!
ttisnil
(
gval
(
n
))
&&
(
iscleared
(
g
,
gkey
(
n
))))
{
if
(
!
ttisnil
(
gval
(
n
))
&&
(
iscleared
(
g
,
gkey
(
n
))))
{
setnilvalue
(
gval
(
n
));
/* remove value ... */
setnilvalue
(
gval
(
n
));
/* remove value ... */
removeentry
(
n
);
/* and remove entry from table */
}
}
if
(
ttisnil
(
gval
(
n
)))
/* is entry empty? */
removeentry
(
n
);
/* remove entry from table */
}
}
}
}
}
}
...
...
Classes/lua/lgc.h
View file @
66d9a533
/*
/*
** $Id: lgc.h,v 2.91
2015/12/21 13:02:1
4 roberto Exp $
** $Id: lgc.h,v 2.91
.1.1 2017/04/19 17:39:3
4 roberto Exp $
** Garbage Collector
** Garbage Collector
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/linit.c
View file @
66d9a533
/*
/*
** $Id: linit.c,v 1.39
2016/12/04 20:17:24
roberto Exp $
** $Id: linit.c,v 1.39
.1.1 2017/04/19 17:20:42
roberto Exp $
** Initialization of libraries for lua.c and other clients
** Initialization of libraries for lua.c and other clients
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/liolib.c
View file @
66d9a533
/*
/*
** $Id: liolib.c,v 2.151
2016/12/20 18:37:00
roberto Exp $
** $Id: liolib.c,v 2.151
.1.1 2017/04/19 17:29:57
roberto Exp $
** Standard I/O (and system) library
** Standard I/O (and system) library
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
@@ -206,11 +206,16 @@ static int aux_close (lua_State *L) {
...
@@ -206,11 +206,16 @@ static int aux_close (lua_State *L) {
}
}
static
int
f_close
(
lua_State
*
L
)
{
tofile
(
L
);
/* make sure argument is an open stream */
return
aux_close
(
L
);
}
static
int
io_close
(
lua_State
*
L
)
{
static
int
io_close
(
lua_State
*
L
)
{
if
(
lua_isnone
(
L
,
1
))
/* no argument? */
if
(
lua_isnone
(
L
,
1
))
/* no argument? */
lua_getfield
(
L
,
LUA_REGISTRYINDEX
,
IO_OUTPUT
);
/* use standard output */
lua_getfield
(
L
,
LUA_REGISTRYINDEX
,
IO_OUTPUT
);
/* use standard output */
tofile
(
L
);
/* make sure argument is an open stream */
return
f_close
(
L
);
return
aux_close
(
L
);
}
}
...
@@ -712,7 +717,7 @@ static const luaL_Reg iolib[] = {
...
@@ -712,7 +717,7 @@ static const luaL_Reg iolib[] = {
** methods for file handles
** methods for file handles
*/
*/
static
const
luaL_Reg
flib
[]
=
{
static
const
luaL_Reg
flib
[]
=
{
{
"close"
,
io
_close
},
{
"close"
,
f
_close
},
{
"flush"
,
f_flush
},
{
"flush"
,
f_flush
},
{
"lines"
,
f_lines
},
{
"lines"
,
f_lines
},
{
"read"
,
f_read
},
{
"read"
,
f_read
},
...
...
Classes/lua/llex.c
View file @
66d9a533
/*
/*
** $Id: llex.c,v 2.96
2016/05/02 14:02:1
2 roberto Exp $
** $Id: llex.c,v 2.96
.1.1 2017/04/19 17:20:4
2 roberto Exp $
** Lexical Analyzer
** Lexical Analyzer
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/llex.h
View file @
66d9a533
/*
/*
** $Id: llex.h,v 1.79
2016/05/02 14:02:1
2 roberto Exp $
** $Id: llex.h,v 1.79
.1.1 2017/04/19 17:20:4
2 roberto Exp $
** Lexical Analyzer
** Lexical Analyzer
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/llimits.h
View file @
66d9a533
/*
/*
** $Id: llimits.h,v 1.141
2015/11/19 19:16:2
2 roberto Exp $
** $Id: llimits.h,v 1.141
.1.1 2017/04/19 17:20:4
2 roberto Exp $
** Limits, basic types, and some other 'installation-dependent' definitions
** Limits, basic types, and some other 'installation-dependent' definitions
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lmathlib.c
View file @
66d9a533
/*
/*
** $Id: lmathlib.c,v 1.119
2016/12/22 13:08:50
roberto Exp $
** $Id: lmathlib.c,v 1.119
.1.1 2017/04/19 17:20:42
roberto Exp $
** Standard mathematical library
** Standard mathematical library
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lmem.c
View file @
66d9a533
/*
/*
** $Id: lmem.c,v 1.91
2015/03/06 19:45:54
roberto Exp $
** $Id: lmem.c,v 1.91
.1.1 2017/04/19 17:20:42
roberto Exp $
** Interface to Memory Manager
** Interface to Memory Manager
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lmem.h
View file @
66d9a533
/*
/*
** $Id: lmem.h,v 1.43
2014/12/19 17:26:14
roberto Exp $
** $Id: lmem.h,v 1.43
.1.1 2017/04/19 17:20:42
roberto Exp $
** Interface to Memory Manager
** Interface to Memory Manager
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/loadlib.c
View file @
66d9a533
/*
/*
** $Id: loadlib.c,v 1.130
2017/01/12 17:14:26
roberto Exp $
** $Id: loadlib.c,v 1.130
.1.1 2017/04/19 17:20:42
roberto Exp $
** Dynamic library loader for Lua
** Dynamic library loader for Lua
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
**
**
...
...
Classes/lua/lobject.c
View file @
66d9a533
/*
/*
** $Id: lobject.c,v 2.113
2016/12/22 13:08:50
roberto Exp $
** $Id: lobject.c,v 2.113
.1.1 2017/04/19 17:29:57
roberto Exp $
** Some generic functions over Lua objects
** Some generic functions over Lua objects
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
@@ -435,7 +435,8 @@ const char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) {
...
@@ -435,7 +435,8 @@ const char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) {
}
}
case
'p'
:
{
/* a pointer */
case
'p'
:
{
/* a pointer */
char
buff
[
4
*
sizeof
(
void
*
)
+
8
];
/* should be enough space for a '%p' */
char
buff
[
4
*
sizeof
(
void
*
)
+
8
];
/* should be enough space for a '%p' */
int
l
=
l_sprintf
(
buff
,
sizeof
(
buff
),
"%p"
,
va_arg
(
argp
,
void
*
));
void
*
p
=
va_arg
(
argp
,
void
*
);
int
l
=
lua_pointer2str
(
buff
,
sizeof
(
buff
),
p
);
pushstr
(
L
,
buff
,
l
);
pushstr
(
L
,
buff
,
l
);
break
;
break
;
}
}
...
...
Classes/lua/lobject.h
View file @
66d9a533
/*
/*
** $Id: lobject.h,v 2.117
2016/08/01 19:51:2
4 roberto Exp $
** $Id: lobject.h,v 2.117
.1.1 2017/04/19 17:39:3
4 roberto Exp $
** Type definitions for Lua objects
** Type definitions for Lua objects
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lopcodes.c
View file @
66d9a533
/*
/*
** $Id: lopcodes.c,v 1.55
2015/01/05 13:48:33
roberto Exp $
** $Id: lopcodes.c,v 1.55
.1.1 2017/04/19 17:20:42
roberto Exp $
** Opcodes for Lua virtual machine
** Opcodes for Lua virtual machine
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lopcodes.h
View file @
66d9a533
/*
/*
** $Id: lopcodes.h,v 1.149
2016/07/19 17:12:21
roberto Exp $
** $Id: lopcodes.h,v 1.149
.1.1 2017/04/19 17:20:42
roberto Exp $
** Opcodes for Lua virtual machine
** Opcodes for Lua virtual machine
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/loslib.c
View file @
66d9a533
/*
/*
** $Id: loslib.c,v 1.65
2016/07/18 17:58:58
roberto Exp $
** $Id: loslib.c,v 1.65
.1.1 2017/04/19 17:29:57
roberto Exp $
** Standard Operating System library
** Standard Operating System library
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
@@ -293,7 +293,8 @@ static int os_date (lua_State *L) {
...
@@ -293,7 +293,8 @@ static int os_date (lua_State *L) {
else
else
stm
=
l_localtime
(
&
t
,
&
tmr
);
stm
=
l_localtime
(
&
t
,
&
tmr
);
if
(
stm
==
NULL
)
/* invalid date? */
if
(
stm
==
NULL
)
/* invalid date? */
luaL_error
(
L
,
"time result cannot be represented in this installation"
);
return
luaL_error
(
L
,
"time result cannot be represented in this installation"
);
if
(
strcmp
(
s
,
"*t"
)
==
0
)
{
if
(
strcmp
(
s
,
"*t"
)
==
0
)
{
lua_createtable
(
L
,
0
,
9
);
/* 9 = number of fields */
lua_createtable
(
L
,
0
,
9
);
/* 9 = number of fields */
setallfields
(
L
,
stm
);
setallfields
(
L
,
stm
);
...
@@ -340,7 +341,8 @@ static int os_time (lua_State *L) {
...
@@ -340,7 +341,8 @@ static int os_time (lua_State *L) {
setallfields
(
L
,
&
ts
);
/* update fields with normalized values */
setallfields
(
L
,
&
ts
);
/* update fields with normalized values */
}
}
if
(
t
!=
(
time_t
)(
l_timet
)
t
||
t
==
(
time_t
)(
-
1
))
if
(
t
!=
(
time_t
)(
l_timet
)
t
||
t
==
(
time_t
)(
-
1
))
luaL_error
(
L
,
"time result cannot be represented in this installation"
);
return
luaL_error
(
L
,
"time result cannot be represented in this installation"
);
l_pushtime
(
L
,
t
);
l_pushtime
(
L
,
t
);
return
1
;
return
1
;
}
}
...
...
Classes/lua/lparser.c
View file @
66d9a533
/*
/*
** $Id: lparser.c,v 2.155
2016/08/01 19:51:24
roberto Exp $
** $Id: lparser.c,v 2.155
.1.2 2017/04/29 18:11:40
roberto Exp $
** Lua Parser
** Lua Parser
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
@@ -1392,7 +1392,7 @@ static void test_then_block (LexState *ls, int *escapelist) {
...
@@ -1392,7 +1392,7 @@ static void test_then_block (LexState *ls, int *escapelist) {
luaK_goiffalse
(
ls
->
fs
,
&
v
);
/* will jump to label if condition is true */
luaK_goiffalse
(
ls
->
fs
,
&
v
);
/* will jump to label if condition is true */
enterblock
(
fs
,
&
bl
,
0
);
/* must enter block before 'goto' */
enterblock
(
fs
,
&
bl
,
0
);
/* must enter block before 'goto' */
gotostat
(
ls
,
v
.
t
);
/* handle goto/break */
gotostat
(
ls
,
v
.
t
);
/* handle goto/break */
skipnoopstat
(
ls
);
/* skip other no-op statement
s */
while
(
testnext
(
ls
,
';'
))
{}
/* skip colon
s */
if
(
block_follow
(
ls
,
0
))
{
/* 'goto' is the entire block? */
if
(
block_follow
(
ls
,
0
))
{
/* 'goto' is the entire block? */
leaveblock
(
fs
);
leaveblock
(
fs
);
return
;
/* and that is it */
return
;
/* and that is it */
...
...
Classes/lua/lparser.h
View file @
66d9a533
/*
/*
** $Id: lparser.h,v 1.76
2015/12/30 18:16:13
roberto Exp $
** $Id: lparser.h,v 1.76
.1.1 2017/04/19 17:20:42
roberto Exp $
** Lua Parser
** Lua Parser
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lprefix.h
View file @
66d9a533
/*
/*
** $Id: lprefix.h,v 1.2
2014/12/29 16:54:13
roberto Exp $
** $Id: lprefix.h,v 1.2
.1.1 2017/04/19 17:20:42
roberto Exp $
** Definitions for Lua code that must come before any other header file
** Definitions for Lua code that must come before any other header file
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lstate.c
View file @
66d9a533
/*
/*
** $Id: lstate.c,v 2.133
2015/11/13 12:16:51
roberto Exp $
** $Id: lstate.c,v 2.133
.1.1 2017/04/19 17:39:34
roberto Exp $
** Global State
** Global State
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lstate.h
View file @
66d9a533
/*
/*
** $Id: lstate.h,v 2.133
2016/12/22 13:08:50
roberto Exp $
** $Id: lstate.h,v 2.133
.1.1 2017/04/19 17:39:34
roberto Exp $
** Global State
** Global State
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
@@ -26,6 +26,24 @@
...
@@ -26,6 +26,24 @@
** 'tobefnz': all objects ready to be finalized;
** 'tobefnz': all objects ready to be finalized;
** 'fixedgc': all objects that are not to be collected (currently
** 'fixedgc': all objects that are not to be collected (currently
** only small strings, such as reserved words).
** only small strings, such as reserved words).
**
** Moreover, there is another set of lists that control gray objects.
** These lists are linked by fields 'gclist'. (All objects that
** can become gray have such a field. The field is not the same
** in all objects, but it always has this name.) Any gray object
** must belong to one of these lists, and all objects in these lists
** must be gray:
**
** 'gray': regular gray objects, still waiting to be visited.
** 'grayagain': objects that must be revisited at the atomic phase.
** That includes
** - black objects got in a write barrier;
** - all kinds of weak tables during propagation phase;
** - all threads.
** 'weak': tables with weak values to be cleared;
** 'ephemeron': ephemeron tables with white->white entries;
** 'allweak': tables with weak keys and/or weak values to be cleared.
** The last three lists are used only during the atomic phase.
*/
*/
...
...
Classes/lua/lstring.c
View file @
66d9a533
/*
/*
** $Id: lstring.c,v 2.56
2015/11/23 11:32:51
roberto Exp $
** $Id: lstring.c,v 2.56
.1.1 2017/04/19 17:20:42
roberto Exp $
** String table (keeps all strings handled by Lua)
** String table (keeps all strings handled by Lua)
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lstring.h
View file @
66d9a533
/*
/*
** $Id: lstring.h,v 1.61
2015/11/03 15:36:01
roberto Exp $
** $Id: lstring.h,v 1.61
.1.1 2017/04/19 17:20:42
roberto Exp $
** String table (keep all strings handled by Lua)
** String table (keep all strings handled by Lua)
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lstrlib.c
View file @
66d9a533
/*
/*
** $Id: lstrlib.c,v 1.254
2016/12/22 13:08:50
roberto Exp $
** $Id: lstrlib.c,v 1.254
.1.1 2017/04/19 17:29:57
roberto Exp $
** Standard library for string operations and pattern-matching
** Standard library for string operations and pattern-matching
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
@@ -879,7 +879,7 @@ static int lua_number2strx (lua_State *L, char *buff, int sz,
...
@@ -879,7 +879,7 @@ static int lua_number2strx (lua_State *L, char *buff, int sz,
buff
[
i
]
=
toupper
(
uchar
(
buff
[
i
]));
buff
[
i
]
=
toupper
(
uchar
(
buff
[
i
]));
}
}
else
if
(
fmt
[
SIZELENMOD
]
!=
'a'
)
else
if
(
fmt
[
SIZELENMOD
]
!=
'a'
)
luaL_error
(
L
,
"modifiers for format '%%a'/'%%A' not implemented"
);
return
luaL_error
(
L
,
"modifiers for format '%%a'/'%%A' not implemented"
);
return
n
;
return
n
;
}
}
...
@@ -1199,8 +1199,8 @@ static int getnum (const char **fmt, int df) {
...
@@ -1199,8 +1199,8 @@ static int getnum (const char **fmt, int df) {
static
int
getnumlimit
(
Header
*
h
,
const
char
**
fmt
,
int
df
)
{
static
int
getnumlimit
(
Header
*
h
,
const
char
**
fmt
,
int
df
)
{
int
sz
=
getnum
(
fmt
,
df
);
int
sz
=
getnum
(
fmt
,
df
);
if
(
sz
>
MAXINTSIZE
||
sz
<=
0
)
if
(
sz
>
MAXINTSIZE
||
sz
<=
0
)
luaL_error
(
h
->
L
,
"integral size (%d) out of limits [1,%d]"
,
return
luaL_error
(
h
->
L
,
"integral size (%d) out of limits [1,%d]"
,
sz
,
MAXINTSIZE
);
sz
,
MAXINTSIZE
);
return
sz
;
return
sz
;
}
}
...
...
Classes/lua/ltable.c
View file @
66d9a533
/*
/*
** $Id: ltable.c,v 2.118
2016/11/07 12:38:35
roberto Exp $
** $Id: ltable.c,v 2.118
.1.4 2018/06/08 16:22:51
roberto Exp $
** Lua tables (hash)
** Lua tables (hash)
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
@@ -223,7 +223,9 @@ static unsigned int computesizes (unsigned int nums[], unsigned int *pna) {
...
@@ -223,7 +223,9 @@ static unsigned int computesizes (unsigned int nums[], unsigned int *pna) {
unsigned
int
na
=
0
;
/* number of elements to go to array part */
unsigned
int
na
=
0
;
/* number of elements to go to array part */
unsigned
int
optimal
=
0
;
/* optimal size for array part */
unsigned
int
optimal
=
0
;
/* optimal size for array part */
/* loop while keys can fill more than half of total size */
/* loop while keys can fill more than half of total size */
for
(
i
=
0
,
twotoi
=
1
;
*
pna
>
twotoi
/
2
;
i
++
,
twotoi
*=
2
)
{
for
(
i
=
0
,
twotoi
=
1
;
twotoi
>
0
&&
*
pna
>
twotoi
/
2
;
i
++
,
twotoi
*=
2
)
{
if
(
nums
[
i
]
>
0
)
{
if
(
nums
[
i
]
>
0
)
{
a
+=
nums
[
i
];
a
+=
nums
[
i
];
if
(
a
>
twotoi
/
2
)
{
/* more than half elements present? */
if
(
a
>
twotoi
/
2
)
{
/* more than half elements present? */
...
@@ -330,17 +332,34 @@ static void setnodevector (lua_State *L, Table *t, unsigned int size) {
...
@@ -330,17 +332,34 @@ static void setnodevector (lua_State *L, Table *t, unsigned int size) {
}
}
typedef
struct
{
Table
*
t
;
unsigned
int
nhsize
;
}
AuxsetnodeT
;
static
void
auxsetnode
(
lua_State
*
L
,
void
*
ud
)
{
AuxsetnodeT
*
asn
=
cast
(
AuxsetnodeT
*
,
ud
);
setnodevector
(
L
,
asn
->
t
,
asn
->
nhsize
);
}
void
luaH_resize
(
lua_State
*
L
,
Table
*
t
,
unsigned
int
nasize
,
void
luaH_resize
(
lua_State
*
L
,
Table
*
t
,
unsigned
int
nasize
,
unsigned
int
nhsize
)
{
unsigned
int
nhsize
)
{
unsigned
int
i
;
unsigned
int
i
;
int
j
;
int
j
;
AuxsetnodeT
asn
;
unsigned
int
oldasize
=
t
->
sizearray
;
unsigned
int
oldasize
=
t
->
sizearray
;
int
oldhsize
=
allocsizenode
(
t
);
int
oldhsize
=
allocsizenode
(
t
);
Node
*
nold
=
t
->
node
;
/* save old hash ... */
Node
*
nold
=
t
->
node
;
/* save old hash ... */
if
(
nasize
>
oldasize
)
/* array part must grow? */
if
(
nasize
>
oldasize
)
/* array part must grow? */
setarrayvector
(
L
,
t
,
nasize
);
setarrayvector
(
L
,
t
,
nasize
);
/* create new hash part with appropriate size */
/* create new hash part with appropriate size */
setnodevector
(
L
,
t
,
nhsize
);
asn
.
t
=
t
;
asn
.
nhsize
=
nhsize
;
if
(
luaD_rawrunprotected
(
L
,
auxsetnode
,
&
asn
)
!=
LUA_OK
)
{
/* mem. error? */
setarrayvector
(
L
,
t
,
oldasize
);
/* array back to its original size */
luaD_throw
(
L
,
LUA_ERRMEM
);
/* rethrow memory error */
}
if
(
nasize
<
oldasize
)
{
/* array part must shrink? */
if
(
nasize
<
oldasize
)
{
/* array part must shrink? */
t
->
sizearray
=
nasize
;
t
->
sizearray
=
nasize
;
/* re-insert elements from vanishing slice */
/* re-insert elements from vanishing slice */
...
@@ -610,13 +629,13 @@ void luaH_setint (lua_State *L, Table *t, lua_Integer key, TValue *value) {
...
@@ -610,13 +629,13 @@ void luaH_setint (lua_State *L, Table *t, lua_Integer key, TValue *value) {
}
}
static
int
unbound_search
(
Table
*
t
,
unsigned
int
j
)
{
static
lua_Unsigned
unbound_search
(
Table
*
t
,
lua_Unsigned
j
)
{
unsigned
int
i
=
j
;
/* i is zero or a present index */
lua_Unsigned
i
=
j
;
/* i is zero or a present index */
j
++
;
j
++
;
/* find 'i' and 'j' such that i is present and j is not */
/* find 'i' and 'j' such that i is present and j is not */
while
(
!
ttisnil
(
luaH_getint
(
t
,
j
)))
{
while
(
!
ttisnil
(
luaH_getint
(
t
,
j
)))
{
i
=
j
;
i
=
j
;
if
(
j
>
cast
(
unsigned
int
,
MAX_INT
)
/
2
)
{
/* overflow? */
if
(
j
>
l_castS2U
(
LUA_MAXINTEGER
)
/
2
)
{
/* overflow? */
/* table was built with bad purposes: resort to linear search */
/* table was built with bad purposes: resort to linear search */
i
=
1
;
i
=
1
;
while
(
!
ttisnil
(
luaH_getint
(
t
,
i
)))
i
++
;
while
(
!
ttisnil
(
luaH_getint
(
t
,
i
)))
i
++
;
...
@@ -626,7 +645,7 @@ static int unbound_search (Table *t, unsigned int j) {
...
@@ -626,7 +645,7 @@ static int unbound_search (Table *t, unsigned int j) {
}
}
/* now do a binary search between them */
/* now do a binary search between them */
while
(
j
-
i
>
1
)
{
while
(
j
-
i
>
1
)
{
unsigned
int
m
=
(
i
+
j
)
/
2
;
lua_Unsigned
m
=
(
i
+
j
)
/
2
;
if
(
ttisnil
(
luaH_getint
(
t
,
m
)))
j
=
m
;
if
(
ttisnil
(
luaH_getint
(
t
,
m
)))
j
=
m
;
else
i
=
m
;
else
i
=
m
;
}
}
...
@@ -638,7 +657,7 @@ static int unbound_search (Table *t, unsigned int j) {
...
@@ -638,7 +657,7 @@ static int unbound_search (Table *t, unsigned int j) {
** Try to find a boundary in table 't'. A 'boundary' is an integer index
** Try to find a boundary in table 't'. A 'boundary' is an integer index
** such that t[i] is non-nil and t[i+1] is nil (and 0 if t[1] is nil).
** such that t[i] is non-nil and t[i+1] is nil (and 0 if t[1] is nil).
*/
*/
int
luaH_getn
(
Table
*
t
)
{
lua_Unsigned
luaH_getn
(
Table
*
t
)
{
unsigned
int
j
=
t
->
sizearray
;
unsigned
int
j
=
t
->
sizearray
;
if
(
j
>
0
&&
ttisnil
(
&
t
->
array
[
j
-
1
]))
{
if
(
j
>
0
&&
ttisnil
(
&
t
->
array
[
j
-
1
]))
{
/* there is a boundary in the array part: (binary) search for it */
/* there is a boundary in the array part: (binary) search for it */
...
...
Classes/lua/ltable.h
View file @
66d9a533
/*
/*
** $Id: ltable.h,v 2.23
2016/12/22 13:08:50
roberto Exp $
** $Id: ltable.h,v 2.23
.1.2 2018/05/24 19:39:05
roberto Exp $
** Lua tables (hash)
** Lua tables (hash)
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
@@ -54,7 +54,7 @@ LUAI_FUNC void luaH_resize (lua_State *L, Table *t, unsigned int nasize,
...
@@ -54,7 +54,7 @@ LUAI_FUNC void luaH_resize (lua_State *L, Table *t, unsigned int nasize,
LUAI_FUNC
void
luaH_resizearray
(
lua_State
*
L
,
Table
*
t
,
unsigned
int
nasize
);
LUAI_FUNC
void
luaH_resizearray
(
lua_State
*
L
,
Table
*
t
,
unsigned
int
nasize
);
LUAI_FUNC
void
luaH_free
(
lua_State
*
L
,
Table
*
t
);
LUAI_FUNC
void
luaH_free
(
lua_State
*
L
,
Table
*
t
);
LUAI_FUNC
int
luaH_next
(
lua_State
*
L
,
Table
*
t
,
StkId
key
);
LUAI_FUNC
int
luaH_next
(
lua_State
*
L
,
Table
*
t
,
StkId
key
);
LUAI_FUNC
int
luaH_getn
(
Table
*
t
);
LUAI_FUNC
lua_Unsigned
luaH_getn
(
Table
*
t
);
#if defined(LUA_DEBUG)
#if defined(LUA_DEBUG)
...
...
Classes/lua/ltablib.c
View file @
66d9a533
/*
/*
** $Id: ltablib.c,v 1.93
2016/02/25 19:41:54
roberto Exp $
** $Id: ltablib.c,v 1.93
.1.1 2017/04/19 17:20:42
roberto Exp $
** Library for Table Manipulation
** Library for Table Manipulation
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/ltm.c
View file @
66d9a533
/*
/*
** $Id: ltm.c,v 2.38
2016/12/22 13:08:50
roberto Exp $
** $Id: ltm.c,v 2.38
.1.1 2017/04/19 17:39:34
roberto Exp $
** Tag methods
** Tag methods
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/ltm.h
View file @
66d9a533
/*
/*
** $Id: ltm.h,v 2.22
2016/02/26 19:20:15
roberto Exp $
** $Id: ltm.h,v 2.22
.1.1 2017/04/19 17:20:42
roberto Exp $
** Tag methods
** Tag methods
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lua.c
View file @
66d9a533
/*
/*
** $Id: lua.c,v 1.230
2017/01/12 17:14:26
roberto Exp $
** $Id: lua.c,v 1.230
.1.1 2017/04/19 17:29:57
roberto Exp $
** Lua stand-alone interpreter
** Lua stand-alone interpreter
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
@@ -138,7 +138,7 @@ static void print_usage (const char *badoption) {
...
@@ -138,7 +138,7 @@ static void print_usage (const char *badoption) {
"Available options are:
\n
"
"Available options are:
\n
"
" -e stat execute string 'stat'
\n
"
" -e stat execute string 'stat'
\n
"
" -i enter interactive mode after executing 'script'
\n
"
" -i enter interactive mode after executing 'script'
\n
"
" -l name require library 'name'
\n
"
" -l name require library 'name'
into global 'name'
\n
"
" -v show version information
\n
"
" -v show version information
\n
"
" -E ignore environment variables
\n
"
" -E ignore environment variables
\n
"
" -- stop handling options
\n
"
" -- stop handling options
\n
"
...
...
Classes/lua/lua.h
View file @
66d9a533
/*
/*
** $Id: lua.h,v 1.332
2016/12/22 15:51:20
roberto Exp $
** $Id: lua.h,v 1.332
.1.2 2018/06/13 16:58:17
roberto Exp $
** Lua - A Scripting Language
** Lua - A Scripting Language
** Lua.org, PUC-Rio, Brazil (http://www.lua.org)
** Lua.org, PUC-Rio, Brazil (http://www.lua.org)
** See Copyright Notice at the end of this file
** See Copyright Notice at the end of this file
...
@@ -19,11 +19,11 @@
...
@@ -19,11 +19,11 @@
#define LUA_VERSION_MAJOR "5"
#define LUA_VERSION_MAJOR "5"
#define LUA_VERSION_MINOR "3"
#define LUA_VERSION_MINOR "3"
#define LUA_VERSION_NUM 503
#define LUA_VERSION_NUM 503
#define LUA_VERSION_RELEASE "
4
"
#define LUA_VERSION_RELEASE "
5
"
#define LUA_VERSION "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR
#define LUA_VERSION "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR
#define LUA_RELEASE LUA_VERSION "." LUA_VERSION_RELEASE
#define LUA_RELEASE LUA_VERSION "." LUA_VERSION_RELEASE
#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-201
7
Lua.org, PUC-Rio"
#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-201
8
Lua.org, PUC-Rio"
#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes"
#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes"
...
@@ -460,7 +460,7 @@ struct lua_Debug {
...
@@ -460,7 +460,7 @@ struct lua_Debug {
/******************************************************************************
/******************************************************************************
* Copyright (C) 1994-201
7
Lua.org, PUC-Rio.
* Copyright (C) 1994-201
8
Lua.org, PUC-Rio.
*
*
* Permission is hereby granted, free of charge, to any person obtaining
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* a copy of this software and associated documentation files (the
...
...
Classes/lua/luac.c
View file @
66d9a533
/*
/*
** $Id: luac.c,v 1.7
5 2015/03/12 01:58:27
lhf Exp $
** $Id: luac.c,v 1.7
6 2018/06/19 01:32:02
lhf Exp $
** Lua compiler (saves bytecodes to files; also lists bytecodes)
** Lua compiler (saves bytecodes to files; also lists bytecodes)
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
@@ -206,7 +206,7 @@ int main(int argc, char* argv[])
...
@@ -206,7 +206,7 @@ int main(int argc, char* argv[])
}
}
/*
/*
** $Id: luac.c,v 1.7
5 2015/03/12 01:58:27
lhf Exp $
** $Id: luac.c,v 1.7
6 2018/06/19 01:32:02
lhf Exp $
** print bytecodes
** print bytecodes
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
@@ -348,6 +348,7 @@ static void PrintCode(const Proto* f)
...
@@ -348,6 +348,7 @@ static void PrintCode(const Proto* f)
case
OP_ADD
:
case
OP_ADD
:
case
OP_SUB
:
case
OP_SUB
:
case
OP_MUL
:
case
OP_MUL
:
case
OP_MOD
:
case
OP_POW
:
case
OP_POW
:
case
OP_DIV
:
case
OP_DIV
:
case
OP_IDIV
:
case
OP_IDIV
:
...
...
Classes/lua/luaconf.h
View file @
66d9a533
/*
/*
** $Id: luaconf.h,v 1.259
2016/12/22 13:08:50
roberto Exp $
** $Id: luaconf.h,v 1.259
.1.1 2017/04/19 17:29:57
roberto Exp $
** Configuration file for Lua
** Configuration file for Lua
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
@@ -620,6 +620,13 @@
...
@@ -620,6 +620,13 @@
#endif
#endif
/*
@@ lua_pointer2str converts a pointer to a readable string in a
** non-specified way.
*/
#define lua_pointer2str(buff,sz,p) l_sprintf(buff,sz,"%p",p)
/*
/*
@@ lua_number2strx converts a float to an hexadecimal numeric string.
@@ lua_number2strx converts a float to an hexadecimal numeric string.
** In C99, 'sprintf' (with format specifiers '%a'/'%A') does that.
** In C99, 'sprintf' (with format specifiers '%a'/'%A') does that.
...
...
Classes/lua/lualib.h
View file @
66d9a533
/*
/*
** $Id: lualib.h,v 1.45
2017/01/12 17:14:26
roberto Exp $
** $Id: lualib.h,v 1.45
.1.1 2017/04/19 17:20:42
roberto Exp $
** Lua standard libraries
** Lua standard libraries
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lundump.c
View file @
66d9a533
/*
/*
** $Id: lundump.c,v 2.44
2015/11/02 16:09:30
roberto Exp $
** $Id: lundump.c,v 2.44
.1.1 2017/04/19 17:20:42
roberto Exp $
** load precompiled Lua chunks
** load precompiled Lua chunks
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lundump.h
View file @
66d9a533
/*
/*
** $Id: lundump.h,v 1.45
2015/09/08 15:41:05
roberto Exp $
** $Id: lundump.h,v 1.45
.1.1 2017/04/19 17:20:42
roberto Exp $
** load precompiled Lua chunks
** load precompiled Lua chunks
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lutf8lib.c
View file @
66d9a533
/*
/*
** $Id: lutf8lib.c,v 1.16
2016/12/22 13:08:50
roberto Exp $
** $Id: lutf8lib.c,v 1.16
.1.1 2017/04/19 17:29:57
roberto Exp $
** Standard library for UTF-8 manipulation
** Standard library for UTF-8 manipulation
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
@@ -171,7 +171,7 @@ static int byteoffset (lua_State *L) {
...
@@ -171,7 +171,7 @@ static int byteoffset (lua_State *L) {
}
}
else
{
else
{
if
(
iscont
(
s
+
posi
))
if
(
iscont
(
s
+
posi
))
luaL_error
(
L
,
"initial position is a continuation byte"
);
return
luaL_error
(
L
,
"initial position is a continuation byte"
);
if
(
n
<
0
)
{
if
(
n
<
0
)
{
while
(
n
<
0
&&
posi
>
0
)
{
/* move back */
while
(
n
<
0
&&
posi
>
0
)
{
/* move back */
do
{
/* find beginning of previous character */
do
{
/* find beginning of previous character */
...
...
Classes/lua/lvm.c
View file @
66d9a533
/*
/*
** $Id: lvm.c,v 2.268
2016/02/05 19:59:1
4 roberto Exp $
** $Id: lvm.c,v 2.268
.1.1 2017/04/19 17:39:3
4 roberto Exp $
** Lua virtual machine
** Lua virtual machine
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lvm.h
View file @
66d9a533
/*
/*
** $Id: lvm.h,v 2.41
2016/12/22 13:08:50
roberto Exp $
** $Id: lvm.h,v 2.41
.1.1 2017/04/19 17:20:42
roberto Exp $
** Lua virtual machine
** Lua virtual machine
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lzio.c
View file @
66d9a533
/*
/*
** $Id: lzio.c,v 1.37
2015/09/08 15:41:05
roberto Exp $
** $Id: lzio.c,v 1.37
.1.1 2017/04/19 17:20:42
roberto Exp $
** Buffered streams
** Buffered streams
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
Classes/lua/lzio.h
View file @
66d9a533
/*
/*
** $Id: lzio.h,v 1.31
2015/09/08 15:41:05
roberto Exp $
** $Id: lzio.h,v 1.31
.1.1 2017/04/19 17:20:42
roberto Exp $
** Buffered streams
** Buffered streams
** See Copyright Notice in lua.h
** See Copyright Notice in lua.h
*/
*/
...
...
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