diff options
| author | ruki <[email protected]> | 2020-08-04 22:45:20 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-08-04 22:45:20 +0800 |
| commit | 81c072eaa6eadde5f6427e0109226a7fa04691b0 (patch) | |
| tree | 7243963c4614209145b441144093889fface5102 /core/src/xmake/process/wait.c | |
| parent | 8b08fbb9f5f0f54dd1232f4bf387932116dde47f (diff) | |
improve pushpointer
Diffstat (limited to 'core/src/xmake/process/wait.c')
| -rw-r--r-- | core/src/xmake/process/wait.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/xmake/process/wait.c b/core/src/xmake/process/wait.c index 0f85f6e2d..bec6f379f 100644 --- a/core/src/xmake/process/wait.c +++ b/core/src/xmake/process/wait.c @@ -40,8 +40,8 @@ tb_int_t xm_process_wait(lua_State* lua) // check tb_assert_and_check_return_val(lua, 0); - // is user data? - if (!lua_isuserdata(lua, 1)) + // is pointer? + if (!xm_lua_ispointer(lua, 1)) { // error lua_pushfstring(lua, "invalid argument type(%s) for process.wait", luaL_typename(lua, 1)); @@ -50,7 +50,7 @@ tb_int_t xm_process_wait(lua_State* lua) } // get the process - tb_process_ref_t process = (tb_process_ref_t)lua_touserdata(lua, 1); + tb_process_ref_t process = (tb_process_ref_t)xm_lua_topointer(lua, 1); tb_check_return_val(process, 0); // get the timeout |
