summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-04-15 00:42:13 +0800
committerruki <[email protected]>2022-04-15 00:42:13 +0800
commita61b2aa25af04eb75c6628fbb4f867c9a82ae72a (patch)
tree66cdf087859ef325539e88358aad79b23003ddea
parent7c2d5669aad5ea71c8e6bc2dfce923fa3d8e897f (diff)
update tbox
m---------core/src/tbox/tbox0
-rw-r--r--core/src/xmake/io/pipe_open.c6
-rw-r--r--core/src/xmake/io/pipe_openpair.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/core/src/tbox/tbox b/core/src/tbox/tbox
-Subproject dd1e219074fc408c032769b932a0cf1b291cdb6
+Subproject ff3073737a6c84de9860307e5ff4e4919bb9171
diff --git a/core/src/xmake/io/pipe_open.c b/core/src/xmake/io/pipe_open.c
index 246ab3ee2..e40451641 100644
--- a/core/src/xmake/io/pipe_open.c
+++ b/core/src/xmake/io/pipe_open.c
@@ -47,9 +47,9 @@ tb_int_t xm_io_pipe_open(lua_State* lua)
tb_char_t const* modestr = luaL_optstring(lua, 2, "r");
tb_assert_and_check_return_val(name && modestr, 0);
- // get file mode value
- tb_size_t mode = TB_FILE_MODE_RO;
- if (modestr[0] == 'w') mode = TB_FILE_MODE_WO;
+ // get pipe mode value
+ tb_size_t mode = TB_PIPE_MODE_RO;
+ if (modestr[0] == 'w') mode = TB_PIPE_MODE_WO;
// get buffer size
tb_size_t buffsize = (tb_size_t)luaL_checknumber(lua, 3);
diff --git a/core/src/xmake/io/pipe_openpair.c b/core/src/xmake/io/pipe_openpair.c
index b772fa192..3e76c94e7 100644
--- a/core/src/xmake/io/pipe_openpair.c
+++ b/core/src/xmake/io/pipe_openpair.c
@@ -47,7 +47,7 @@ tb_int_t xm_io_pipe_openpair(lua_State* lua)
// init pipe
tb_pipe_file_ref_t pipefile[2];
- if (tb_pipe_file_init_pair(pipefile, buffsize))
+ if (tb_pipe_file_init_pair(pipefile, tb_null, buffsize))
{
xm_lua_pushpointer(lua, (tb_pointer_t)pipefile[0]);
xm_lua_pushpointer(lua, (tb_pointer_t)pipefile[1]);