Skip to content

Commit 218e2e9

Browse files
committed
Initial files.
0 parents  commit 218e2e9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+20580
-0
lines changed

src/CMakeLists.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
project(Lua CXX)
2+
3+
file(GLOB_RECURSE SOURCE_FILES *.c)
4+
file(GLOB_RECURSE HEADER_FILES *.h)
5+
6+
list(REMOVE_ITEM SOURCE_FILES
7+
${CMAKE_CURRENT_SOURCE_DIR}/lua.c
8+
${CMAKE_CURRENT_SOURCE_DIR}/luac.c
9+
)
10+
11+
set_source_files_properties(${SOURCE_FILES} PROPERTIES LANGUAGE CXX)
12+
13+
add_library(${PROJECT_NAME} ${SOURCE_FILES} ${HEADER_FILES})
14+
15+
target_compile_definitions(${PROJECT_NAME} PUBLIC
16+
-DLUA_COMPAT_ALL
17+
-DLUA_USE_POSIX
18+
-DLUA_USE_STRTODHEX
19+
-DLUA_USE_AFORMAT
20+
-DLUA_USE_LONGLONG
21+
)
22+
23+
target_compile_options(${PROJECT_NAME} PRIVATE
24+
-include ${CMAKE_CURRENT_SOURCE_DIR}/override_printf.h
25+
-x c++
26+
)
27+
28+
target_link_libraries(${PROJECT_NAME} trio)

src/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
EXCLUDE=lua.c luac.c
2+
CFLAGS=-DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_STRTODHEX -DLUA_USE_AFORMAT -DLUA_USE_LONGLONG
3+
CFLAGS+=-I../trio -include override_printf.h
4+
# Compiling C files as C++
5+
CC:=${CXX}
6+
CFLAGS+=-x c++
7+
include ../common.make

src/README

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
This is Lua 5.2.1, released on 08 Jun 2012.
3+
4+
For installation instructions, license details, and
5+
further information about Lua, see doc/readme.html.
6+
7+
------------------------------------------------------------------------------------------------
8+
Applied fix: http://www.lua.org/bugs.html#5.2.3-2
9+
10+
lgc.c:
11+
@@ -403,7 +403,7 @@
12+
reallymarkobject(g, gcvalue(gval(n))); /* mark it now */
13+
}
14+
}
15+
- if (prop)
16+
+ if (g->gcstate != GCSatomic || prop)
17+
linktable(h, &g->ephemeron); /* have to propagate again */
18+
else if (hasclears) /* does table have white keys? */
19+
linktable(h, &g->allweak); /* may have to clean white keys */
20+
------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)