Skip to content

Commit 1cda292

Browse files
committed
更新tolua#到1.0.5.152版
1 parent 11621b4 commit 1cda292

File tree

283 files changed

+5304
-2763
lines changed

Some content is hidden

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

283 files changed

+5304
-2763
lines changed

.DS_Store

2 KB
Binary file not shown.

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
# Libraries
1212
*.lib
13-
*.a
1413
*.la
1514
*.lo
1615

Plugins/.DS_Store

0 Bytes
Binary file not shown.

Plugins/iOS/libtolua.a

4.01 MB
Binary file not shown.

Plugins/tolua.bundle/Contents/Info.plist

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<key>CFBundleExecutable</key>
1010
<string>tolua</string>
1111
<key>CFBundleIdentifier</key>
12-
<string>xlcw.{PRODUCT_NAME:rfc1034identifier}$</string>
12+
<string>ameng.tolua</string>
1313
<key>CFBundleInfoDictionaryVersion</key>
1414
<string>6.0</string>
1515
<key>CFBundleName</key>
@@ -47,17 +47,17 @@
4747
<key>DTCompiler</key>
4848
<string>com.apple.compilers.llvm.clang.1_0</string>
4949
<key>DTPlatformBuild</key>
50-
<string>7C1002</string>
50+
<string>7D175</string>
5151
<key>DTPlatformVersion</key>
5252
<string>GM</string>
5353
<key>DTSDKBuild</key>
54-
<string>15C43</string>
54+
<string>15E60</string>
5555
<key>DTSDKName</key>
5656
<string>macosx10.11</string>
5757
<key>DTXcode</key>
58-
<string>0721</string>
58+
<string>0730</string>
5959
<key>DTXcodeBuild</key>
60-
<string>7C1002</string>
60+
<string>7D175</string>
6161
<key>NSHumanReadableCopyright</key>
6262
<string>Copyright © 2013 xlcw games. All rights reserved.</string>
6363
</dict>
-186 KB
Binary file not shown.

README.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1-
NDK: http://dl.google.com/android/ndk/android-ndk-r10e-windows-x86_64.exe
2-
31
#tolua_runtime
42
**Build**<br>
53
pc: build_win32.sh build_win64.h (mingw + luajit2.0.4) <br>
64
android: build_arm.sh build_x86.sh (mingw + luajit2.0.4) <br>
75
mac: build_osx.sh (xcode + luac5.1.5 luajit can't run in unity5) <br>
86
ios: build_ios.sh (xcode + luajit2.1 beta) <br>
97

10-
8+
NDK 版本:android-ndk-r10e 默认安装到 D:/android-ndk-r10e
9+
#Libs
10+
**cjson**<br>
11+
https://github.com/mpx/lua-cjson<br>
12+
**protoc-gen-lua**<br>
13+
https://github.com/topameng/protoc-gen-lua<br>
14+
**LuaSocket** <br>
15+
https://github.com/diegonehab/luasocket
16+
**struct**<br>
17+
http://www.inf.puc-rio.br/~roberto/struct/
18+
**lpeg**<br>
19+
http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html

android/jni/Android.mk

+5-5
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,23 @@ LOCAL_SRC_FILES := ../../tolua.c \
3636
../../pbc/src/varint.c \
3737
../../pbc/src/wmessage.c \
3838
../../pbc/binding/lua/pbc-lua.c \
39-
../../cjson/fpconv.c \
40-
../../cjson/strbuf.c \
41-
../../cjson/lua_cjson.c \
39+
../../cjson/strbuf.c \
40+
../../cjson/lua_cjson.c \
41+
../../cjson/fpconv.c \
4242
../../luasocket/auxiliar.c \
4343
../../luasocket/buffer.c \
4444
../../luasocket/except.c \
4545
../../luasocket/inet.c \
4646
../../luasocket/io.c \
4747
../../luasocket/luasocket.c \
48-
../../luasocket/luasocket_scripts.c \
49-
../../luasocket/mime.c \
48+
../../luasocket/mime.c \
5049
../../luasocket/options.c \
5150
../../luasocket/select.c \
5251
../../luasocket/tcp.c \
5352
../../luasocket/timeout.c \
5453
../../luasocket/udp.c \
5554
../../luasocket/usocket.c \
55+
../../luasocket/compat.c \
5656

5757
LOCAL_WHOLE_STATIC_LIBRARIES += libluajit
5858
include $(BUILD_SHARED_LIBRARY)

android/jni/libluajit.a

884 KB
Binary file not shown.
688 KB
Binary file not shown.

android/obj/local/x86/libluajit.a

884 KB
Binary file not shown.

build_win32.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ gcc -m32 -O3 -std=gnu99 -shared \
3737
luasocket/inet.c \
3838
luasocket/io.c \
3939
luasocket/luasocket.c \
40-
luasocket/luasocket_scripts.c \
4140
luasocket/mime.c \
4241
luasocket/options.c \
4342
luasocket/select.c \
4443
luasocket/tcp.c \
4544
luasocket/timeout.c \
4645
luasocket/udp.c \
4746
luasocket/wsocket.c \
47+
luasocket/compat.c \
4848
-o Plugins/x86/tolua.dll \
4949
-I./ \
5050
-Iluajit/src \

build_win64.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ gcc -m64 -O3 -std=gnu99 -shared \
3737
luasocket/inet.c \
3838
luasocket/io.c \
3939
luasocket/luasocket.c \
40-
luasocket/luasocket_scripts.c \
4140
luasocket/mime.c \
4241
luasocket/options.c \
4342
luasocket/select.c \
4443
luasocket/tcp.c \
4544
luasocket/timeout.c \
4645
luasocket/udp.c \
4746
luasocket/wsocket.c \
47+
luasocket/compat.c \
4848
-o Plugins/x86_64/tolua.dll \
4949
-I./ \
5050
-Iluajit/src \

cjson/WHAT

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
lua-cjson 2.1.0-luapower from http://www.kyne.com.au/~mark/software/lua-cjson.php (MIT license)
2+
3+
Added option to encode empty tables as arrays and set it as default.

cjson/build/libcjson.a

6.22 KB
Binary file not shown.

cjson/fpconv.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ static inline void fpconv_init()
1212
/* Do nothing - not required */
1313
}
1414
#else
15-
extern inline void fpconv_init();
15+
extern void fpconv_init();
1616
#endif
1717

1818
extern int fpconv_g_fmt(char*, double, int);

cjson/lua_cjson.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -1359,8 +1359,7 @@ static int lua_cjson_new(lua_State *l)
13591359
fpconv_init();
13601360

13611361
/* cjson module table */
1362-
//lua_newtable(l);
1363-
luaL_register(l, CJSON_MODNAME, reg);
1362+
lua_newtable(l);
13641363

13651364
/* Register functions with config data as upvalue */
13661365
json_create_config(l);

cjson/strbuf.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ void strbuf_set_increment(strbuf_t *s, int increment)
9494
static inline void debug_stats(strbuf_t *s)
9595
{
9696
if (s->debug) {
97-
fprintf(stderr, "strbuf(%lx) reallocs: %d, length: %d, size: %d\n",
98-
(long)s, s->reallocs, s->length, s->size);
97+
fprintf(stderr, "strbuf(%p) reallocs: %d, length: %d, size: %d\n",
98+
s, s->reallocs, s->length, s->size);
9999
}
100100
}
101101

@@ -168,8 +168,8 @@ void strbuf_resize(strbuf_t *s, int len)
168168
newsize = calculate_new_size(s, len);
169169

170170
if (s->debug > 1) {
171-
fprintf(stderr, "strbuf(%lx) resize: %d => %d\n",
172-
(long)s, s->size, newsize);
171+
fprintf(stderr, "strbuf(%p) resize: %d => %d\n",
172+
s, s->size, newsize);
173173
}
174174

175175
s->size = newsize;

iOS/.DS_Store

2 KB
Binary file not shown.

iOS/libluajit-arm64.a

1.22 MB
Binary file not shown.

iOS/libluajit-armv7.a

1.12 MB
Binary file not shown.

iOS/libluajit-armv7s.a

1.13 MB
Binary file not shown.

iOS/libluajit.a

3.46 MB
Binary file not shown.

iOS/libpbc/libpbc.a

398 KB
Binary file not shown.

0 commit comments

Comments
 (0)