diff options
| author | ruki <[email protected]> | 2021-09-25 21:01:04 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-09-25 21:01:04 +0800 |
| commit | 50eeea59ecee08e93e2c69929d12fa6953b92855 (patch) | |
| tree | 46cdc675a4a374bb43b7944b863a853da200512f /core/src/xmake | |
| parent | 8970563b1478bced1c9550506f96eac0b914696a (diff) | |
fix format for lua
Diffstat (limited to 'core/src/xmake')
| -rw-r--r-- | core/src/xmake/io/pipe_read.c | 2 | ||||
| -rw-r--r-- | core/src/xmake/io/pipe_write.c | 6 | ||||
| -rw-r--r-- | core/src/xmake/io/socket_recv.c | 2 | ||||
| -rw-r--r-- | core/src/xmake/io/socket_recvfrom.c | 2 | ||||
| -rw-r--r-- | core/src/xmake/io/socket_send.c | 6 | ||||
| -rw-r--r-- | core/src/xmake/io/socket_sendfile.c | 4 | ||||
| -rw-r--r-- | core/src/xmake/io/socket_sendto.c | 2 | ||||
| -rw-r--r-- | core/src/xmake/process/open.c | 4 | ||||
| -rw-r--r-- | core/src/xmake/process/openv.c | 6 |
9 files changed, 17 insertions, 17 deletions
diff --git a/core/src/xmake/io/pipe_read.c b/core/src/xmake/io/pipe_read.c index 73451995b..72a931f5c 100644 --- a/core/src/xmake/io/pipe_read.c +++ b/core/src/xmake/io/pipe_read.c @@ -69,7 +69,7 @@ tb_int_t xm_io_pipe_read(lua_State* lua) if (size <= 0) { lua_pushinteger(lua, -1); - lua_pushfstring(lua, "invalid size(%ld)!", size); + lua_pushfstring(lua, "invalid size(%d)!", (tb_int_t)size); return 2; } diff --git a/core/src/xmake/io/pipe_write.c b/core/src/xmake/io/pipe_write.c index 27d805ace..c44836783 100644 --- a/core/src/xmake/io/pipe_write.c +++ b/core/src/xmake/io/pipe_write.c @@ -78,7 +78,7 @@ tb_int_t xm_io_pipe_write(lua_State* lua) if (!data || !size) { lua_pushinteger(lua, -1); - lua_pushfstring(lua, "invalid data(%p) and size(%zu)!", data, size); + lua_pushfstring(lua, "invalid data(%p) and size(%d)!", data, (tb_int_t)size); return 2; } @@ -88,7 +88,7 @@ tb_int_t xm_io_pipe_write(lua_State* lua) if (start < 1 || start > size) { lua_pushinteger(lua, -1); - lua_pushfstring(lua, "invalid start position(%ld)!", start); + lua_pushfstring(lua, "invalid start position(%d)!", (tb_int_t)start); return 2; } @@ -98,7 +98,7 @@ tb_int_t xm_io_pipe_write(lua_State* lua) if (last < start - 1 || last > size + start - 1) { lua_pushinteger(lua, -1); - lua_pushfstring(lua, "invalid last position(%ld)!", last); + lua_pushfstring(lua, "invalid last position(%d)!", (tb_int_t)last); return 2; } diff --git a/core/src/xmake/io/socket_recv.c b/core/src/xmake/io/socket_recv.c index aefdfc485..e3bd2dfed 100644 --- a/core/src/xmake/io/socket_recv.c +++ b/core/src/xmake/io/socket_recv.c @@ -69,7 +69,7 @@ tb_int_t xm_io_socket_recv(lua_State* lua) if (size <= 0) { lua_pushinteger(lua, -1); - lua_pushfstring(lua, "invalid size(%ld)!", size); + lua_pushfstring(lua, "invalid size(%d)!", (tb_int_t)size); return 2; } diff --git a/core/src/xmake/io/socket_recvfrom.c b/core/src/xmake/io/socket_recvfrom.c index 243e6e08f..2a6ed7a16 100644 --- a/core/src/xmake/io/socket_recvfrom.c +++ b/core/src/xmake/io/socket_recvfrom.c @@ -69,7 +69,7 @@ tb_int_t xm_io_socket_recvfrom(lua_State* lua) if (size <= 0) { lua_pushinteger(lua, -1); - lua_pushfstring(lua, "invalid size(%ld)!", size); + lua_pushfstring(lua, "invalid size(%d)!", (tb_int_t)size); return 2; } diff --git a/core/src/xmake/io/socket_send.c b/core/src/xmake/io/socket_send.c index 71c057de8..5d697f3e4 100644 --- a/core/src/xmake/io/socket_send.c +++ b/core/src/xmake/io/socket_send.c @@ -78,7 +78,7 @@ tb_int_t xm_io_socket_send(lua_State* lua) if (!data || !size) { lua_pushinteger(lua, -1); - lua_pushfstring(lua, "invalid data(%p) and size(%zu)!", data, size); + lua_pushfstring(lua, "invalid data(%p) and size(%d)!", data, (tb_int_t)size); return 2; } @@ -88,7 +88,7 @@ tb_int_t xm_io_socket_send(lua_State* lua) if (start < 1 || start > size) { lua_pushinteger(lua, -1); - lua_pushfstring(lua, "invalid start position(%ld)!", start); + lua_pushfstring(lua, "invalid start position(%d)!", (tb_int_t)start); return 2; } @@ -98,7 +98,7 @@ tb_int_t xm_io_socket_send(lua_State* lua) if (last < start - 1 || last > size + start - 1) { lua_pushinteger(lua, -1); - lua_pushfstring(lua, "invalid last position(%ld)!", last); + lua_pushfstring(lua, "invalid last position(%d)!", (tb_int_t)last); return 2; } diff --git a/core/src/xmake/io/socket_sendfile.c b/core/src/xmake/io/socket_sendfile.c index fba10874b..456d23b49 100644 --- a/core/src/xmake/io/socket_sendfile.c +++ b/core/src/xmake/io/socket_sendfile.c @@ -96,7 +96,7 @@ tb_int_t xm_io_socket_sendfile(lua_State* lua) if (start < 1 || start > filesize) { lua_pushinteger(lua, -1); - lua_pushfstring(lua, "invalid start position(%ld)!", start); + lua_pushfstring(lua, "invalid start position(%d)!", (tb_int_t)start); return 2; } @@ -106,7 +106,7 @@ tb_int_t xm_io_socket_sendfile(lua_State* lua) if (last < start - 1 || last > filesize + start - 1) { lua_pushinteger(lua, -1); - lua_pushfstring(lua, "invalid last position(%ld)!", last); + lua_pushfstring(lua, "invalid last position(%d)!", (tb_int_t)last); return 2; } diff --git a/core/src/xmake/io/socket_sendto.c b/core/src/xmake/io/socket_sendto.c index 864b51936..f203df5b6 100644 --- a/core/src/xmake/io/socket_sendto.c +++ b/core/src/xmake/io/socket_sendto.c @@ -78,7 +78,7 @@ tb_int_t xm_io_socket_sendto(lua_State* lua) if (!data || !size) { lua_pushinteger(lua, -1); - lua_pushfstring(lua, "invalid data(%p) and size(%zu)!", data, size); + lua_pushfstring(lua, "invalid data(%p) and size(%d)!", data, (tb_int_t)size); return 2; } diff --git a/core/src/xmake/process/open.c b/core/src/xmake/process/open.c index c35d9e3bf..083a01070 100644 --- a/core/src/xmake/process/open.c +++ b/core/src/xmake/process/open.c @@ -178,14 +178,14 @@ tb_int_t xm_process_open(lua_State* lua) else { // error - lua_pushfstring(lua, "envs is too large(%lu > %d) for process.openv", envn, tb_arrayn(envs) - 1); + lua_pushfstring(lua, "envs is too large(%d > %d) for process.openv", (tb_int_t)envn, tb_arrayn(envs) - 1); lua_error(lua); } } else { // error - lua_pushfstring(lua, "invalid envs[%ld] type(%s) for process.openv", i, luaL_typename(lua, -1)); + lua_pushfstring(lua, "invalid envs[%d] type(%s) for process.openv", (tb_int_t)i, luaL_typename(lua, -1)); lua_error(lua); } diff --git a/core/src/xmake/process/openv.c b/core/src/xmake/process/openv.c index 3ec887f1e..46bec2cf5 100644 --- a/core/src/xmake/process/openv.c +++ b/core/src/xmake/process/openv.c @@ -85,7 +85,7 @@ tb_int_t xm_process_openv(lua_State* lua) else { // error - lua_pushfstring(lua, "invalid argv[%ld] type(%s) for process.openv", argi, luaL_typename(lua, -1)); + lua_pushfstring(lua, "invalid argv[%d] type(%s) for process.openv", (tb_int_t)argi, luaL_typename(lua, -1)); lua_error(lua); } @@ -220,14 +220,14 @@ tb_int_t xm_process_openv(lua_State* lua) else { // error - lua_pushfstring(lua, "envs is too large(%lu > %d) for process.openv", envn, tb_arrayn(envs) - 1); + lua_pushfstring(lua, "envs is too large(%d > %d) for process.openv", (tb_int_t)envn, tb_arrayn(envs) - 1); lua_error(lua); } } else { // error - lua_pushfstring(lua, "invalid envs[%ld] type(%s) for process.openv", i, luaL_typename(lua, -1)); + lua_pushfstring(lua, "invalid envs[%d] type(%s) for process.openv", (tb_int_t)i, luaL_typename(lua, -1)); lua_error(lua); } |
