diff options
| author | ruki <[email protected]> | 2026-03-30 23:59:50 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-03-30 23:59:50 +0800 |
| commit | 90f05f17328ccac2764fb80895ef72c4510d91f6 (patch) | |
| tree | d32f59d711b5ae9597ccf29f448b6b2c0322c8fc /xmake/modules/utils/progress.lua | |
| parent | 701d59c83a64bf5aa73f2bc386a0cdba087349c4 (diff) | |
add more comments
Diffstat (limited to 'xmake/modules/utils/progress.lua')
| -rw-r--r-- | xmake/modules/utils/progress.lua | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/xmake/modules/utils/progress.lua b/xmake/modules/utils/progress.lua index 8d7ab53f3..ac9c1e8f6 100644 --- a/xmake/modules/utils/progress.lua +++ b/xmake/modules/utils/progress.lua @@ -375,8 +375,11 @@ function _get_target_name_prefix(progress) end end --- set the associated target name for the progress object (coroutine-local) --- it's safe to call with non-table progress (e.g. number), it will be ignored +-- set the associated target name for the progress display +-- +-- @param progress the progress object or number +-- @param target the target instance +-- function set_target(progress, target) if _is_show_target_enabled() and type(progress) == "table" and progress.set then progress:set("target_name", target:fullname()) @@ -510,7 +513,13 @@ function show_abort() end end --- get the message text with progress +-- get the formatted message text with progress (without printing) +-- +-- @param progress the progress value (0 ~ 100) +-- @param format the format string +-- @param ... the format arguments +-- @return the formatted text string +-- function text(progress, format, ...) local target_prefix = _get_target_name_prefix(progress) if target_prefix then |
