diff options
| author | ruki <[email protected]> | 2023-05-05 00:25:20 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-05-05 00:25:20 +0800 |
| commit | 23b27938f797d55ba2aebe34a7e7dbd09b685b69 (patch) | |
| tree | 51995ade7721d986d17e76662c937d8e14103cf6 /core/src | |
| parent | 82b6ea8d359913dcc5e27e8d0faf7cb0e1cf54e3 (diff) | |
remove some comments
Diffstat (limited to 'core/src')
| -rw-r--r-- | core/src/xmake/engine.c | 1 | ||||
| -rw-r--r-- | core/src/xmake/os/curdir.c | 4 | ||||
| -rw-r--r-- | core/src/xmake/os/emptydir.c | 4 | ||||
| -rw-r--r-- | core/src/xmake/os/exists.c | 4 | ||||
| -rw-r--r-- | core/src/xmake/os/filesize.c | 4 | ||||
| -rw-r--r-- | core/src/xmake/os/mtime.c | 2 | ||||
| -rw-r--r-- | core/src/xmake/os/rmdir.c | 4 | ||||
| -rw-r--r-- | core/src/xmake/os/tmpdir.c | 4 | ||||
| -rw-r--r-- | core/src/xmake/path/is_absolute.c | 4 | ||||
| -rw-r--r-- | core/src/xmake/path/relative.c | 2 | ||||
| -rw-r--r-- | core/src/xmake/string/trim.c | 4 |
11 files changed, 9 insertions, 28 deletions
diff --git a/core/src/xmake/engine.c b/core/src/xmake/engine.c index f9789b104..70e423b1b 100644 --- a/core/src/xmake/engine.c +++ b/core/src/xmake/engine.c @@ -1054,7 +1054,6 @@ static tb_pointer_t xm_engine_lua_realloc(tb_pointer_t udata, tb_pointer_t data, */ xm_engine_ref_t xm_engine_init(tb_char_t const* name, xm_engine_lni_initalizer_cb_t lni_initalizer) { - // done tb_bool_t ok = tb_false; xm_engine_t* engine = tb_null; do diff --git a/core/src/xmake/os/curdir.c b/core/src/xmake/os/curdir.c index cd8f2f800..b7b1499c7 100644 --- a/core/src/xmake/os/curdir.c +++ b/core/src/xmake/os/curdir.c @@ -38,11 +38,9 @@ tb_int_t xm_os_curdir(lua_State* lua) // check tb_assert_and_check_return_val(lua, 0); - // done os.curdir() + // os.curdir() tb_char_t path[TB_PATH_MAXN]; if (tb_directory_current(path, sizeof(path))) lua_pushstring(lua, path); else lua_pushnil(lua); - - // ok return 1; } diff --git a/core/src/xmake/os/emptydir.c b/core/src/xmake/os/emptydir.c index 1d6cc0bb0..310aae7b6 100644 --- a/core/src/xmake/os/emptydir.c +++ b/core/src/xmake/os/emptydir.c @@ -60,13 +60,11 @@ tb_int_t xm_os_emptydir(lua_State* lua) tb_char_t const* dir = luaL_checkstring(lua, 1); tb_check_return_val(dir, 0); - // done os.emptydir(dir) + // os.emptydir(dir) tb_bool_t is_emptydir = tb_true; tb_directory_walk(dir, tb_true, tb_true, xm_os_emptydir_walk, &is_emptydir); // is emptydir? lua_pushboolean(lua, is_emptydir); - - // ok return 1; } diff --git a/core/src/xmake/os/exists.c b/core/src/xmake/os/exists.c index 3c66b5f59..05458ca5e 100644 --- a/core/src/xmake/os/exists.c +++ b/core/src/xmake/os/exists.c @@ -42,9 +42,7 @@ tb_int_t xm_os_exists(lua_State* lua) tb_char_t const* path = luaL_checkstring(lua, 1); tb_check_return_val(path, 0); - // done os.exists(path) + // os.exists(path) lua_pushboolean(lua, tb_file_info(path, tb_null)); - - // ok return 1; } diff --git a/core/src/xmake/os/filesize.c b/core/src/xmake/os/filesize.c index c51f3a0cb..dceb90898 100644 --- a/core/src/xmake/os/filesize.c +++ b/core/src/xmake/os/filesize.c @@ -42,12 +42,10 @@ tb_int_t xm_os_filesize(lua_State* lua) tb_char_t const* path = luaL_checkstring(lua, 1); tb_check_return_val(path, 0); - // done os.filesize(path) + // os.filesize(path) tb_file_info_t info = {0}; if (tb_file_info(path, &info) && (info.type == TB_FILE_TYPE_FILE)) lua_pushinteger(lua, (lua_Integer)info.size); else lua_pushinteger(lua, 0); - - // ok return 1; } diff --git a/core/src/xmake/os/mtime.c b/core/src/xmake/os/mtime.c index 0fa9d3da9..72767c9ed 100644 --- a/core/src/xmake/os/mtime.c +++ b/core/src/xmake/os/mtime.c @@ -42,7 +42,7 @@ tb_int_t xm_os_mtime(lua_State* lua) tb_char_t const* path = luaL_checkstring(lua, 1); tb_check_return_val(path, 0); - // done os.mtime(path) + // os.mtime(path) tb_file_info_t info = {0}; if (tb_file_info(path, &info)) lua_pushinteger(lua, (lua_Integer)info.mtime); diff --git a/core/src/xmake/os/rmdir.c b/core/src/xmake/os/rmdir.c index 62e7ed480..7aa0cb6e9 100644 --- a/core/src/xmake/os/rmdir.c +++ b/core/src/xmake/os/rmdir.c @@ -101,10 +101,8 @@ tb_int_t xm_os_rmdir(lua_State* lua) } else { - // done os.rmdir(path) + // os.rmdir(path) lua_pushboolean(lua, tb_directory_remove(path)); } - - // ok return 1; } diff --git a/core/src/xmake/os/tmpdir.c b/core/src/xmake/os/tmpdir.c index a062efed2..379673340 100644 --- a/core/src/xmake/os/tmpdir.c +++ b/core/src/xmake/os/tmpdir.c @@ -38,11 +38,9 @@ tb_int_t xm_os_tmpdir(lua_State* lua) // check tb_assert_and_check_return_val(lua, 0); - // done os.tmpdir() + // os.tmpdir() tb_char_t path[TB_PATH_MAXN]; if (tb_directory_temporary(path, sizeof(path))) lua_pushstring(lua, path); else lua_pushnil(lua); - - // ok return 1; } diff --git a/core/src/xmake/path/is_absolute.c b/core/src/xmake/path/is_absolute.c index d54d58387..04f1af580 100644 --- a/core/src/xmake/path/is_absolute.c +++ b/core/src/xmake/path/is_absolute.c @@ -42,9 +42,7 @@ tb_int_t xm_path_is_absolute(lua_State* lua) tb_char_t const* path = luaL_checkstring(lua, 1); tb_check_return_val(path, 0); - // done path:is_absolute() + // path:is_absolute() lua_pushboolean(lua, tb_path_is_absolute(path)); - - // ok return 1; } diff --git a/core/src/xmake/path/relative.c b/core/src/xmake/path/relative.c index f64667747..543dd5b11 100644 --- a/core/src/xmake/path/relative.c +++ b/core/src/xmake/path/relative.c @@ -45,7 +45,7 @@ tb_int_t xm_path_relative(lua_State* lua) // get the root tb_char_t const* root = luaL_optstring(lua, 2, tb_null); - // done path:relative(root) + // path:relative(root) tb_char_t data[TB_PATH_MAXN]; lua_pushstring(lua, tb_path_relative_to(root, path, data, sizeof(data) - 1)); return 1; diff --git a/core/src/xmake/string/trim.c b/core/src/xmake/string/trim.c index ce9bbd805..de88d0672 100644 --- a/core/src/xmake/string/trim.c +++ b/core/src/xmake/string/trim.c @@ -65,11 +65,9 @@ static tb_char_t const* xm_string_ltrim(tb_char_t const* sstr, tb_char_t const* // check tb_assert(sstr && estr && ctrim); - // done tb_char_t const* p = sstr; while (p < estr && tb_strnchr(ctrim, ntrim, *p)) p++; - return p; } @@ -78,11 +76,9 @@ static tb_char_t const* xm_string_rtrim(tb_char_t const* sstr, tb_char_t const* // check tb_assert(sstr && estr && ctrim); - // done tb_char_t const* p = estr - 1; while (p >= sstr && tb_strnchr(ctrim, ntrim, *p)) p--; - return p + 1; } |
