Skip to content

Commit 1d7071a

Browse files
committed
Merge branch 'develop'
2 parents 467b4c8 + 3da4a93 commit 1d7071a

File tree

2,276 files changed

+378761
-57882
lines changed

Some content is hidden

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

2,276 files changed

+378761
-57882
lines changed

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ Common:
7979
- add CCNotificationCenter Lua support
8080
- CCLuaEngine:executeLayerKeypadEvent() use "back", "menu" for keypad events
8181
- add Lua global function CCLuaLoadChunksFromZIP()
82-
- add Lua global function typen() for faster type check, and constants LUA\_TNIL, LUA\_TBOOLEAN, LUA\_TLIGHTUSERDATA, LUA\_TNUMBER, LUA\_TSTRING, LUA\_TTABLE, LUA\_TFUNCTION, LUA\_TUSERDATA, LUA\_TTHREAD
8382
- add Lua global function CCLuaStackSnapshot, get Lua state snapshot
8483
- upgrade LuaJIT to 2.0.2
8584
- add LuaJavaBridge

bin/lib/compile_luabinding_functions.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,9 @@ function build()
179179
}
180180
$macros = implode(' ', $macros);
181181

182-
$command = sprintf('"%s" %s -L "%s" -o "%s" "%s"', TOLUA_BIN, $macros, CONFIG_PATH, $this->outputSourcePath_, $this->inputPath_);
182+
chdir(dirname($this->inputPath_));
183+
$inputFilename = pathinfo($this->inputPath_, PATHINFO_BASENAME);
184+
$command = sprintf('"%s" %s -L "%s" -o "%s" "%s"', TOLUA_BIN, $macros, CONFIG_PATH, $this->outputSourcePath_, $inputFilename);
183185
printf("\ncommand: %s\n\n", $command);
184186

185187
printf("creating file: %s\n\n", $this->outputSourcePath_);
@@ -320,7 +322,7 @@ function long2str($v, $w) {
320322
}
321323

322324
function str2long($s, $w) {
323-
$v = unpack("V*", $s. str_repeat("\0", (4 - strlen($s) % 4) & 3));
325+
$v = unpack("V*", $s . str_repeat("\0", (4 - strlen($s) % 4) & 3));
324326
$v = array_values($v);
325327
if ($w) {
326328
$v[count($v)] = strlen($s);

0 commit comments

Comments
 (0)