summaryrefslogtreecommitdiff
path: root/xmake/modules/utils/binary/bin2c.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2025-12-07 17:47:01 +0800
committerruki <[email protected]>2025-12-07 17:47:01 +0800
commitf4cd87b0135d84932f186bc068a5232912ee43b9 (patch)
tree1e1bba0e8a5160cc4a9cd8f5de0bdef15ea2ba64 /xmake/modules/utils/binary/bin2c.lua
parent35aeaac3f956f26f188ebab40c443b64d2cb2f95 (diff)
update bin2c
Diffstat (limited to 'xmake/modules/utils/binary/bin2c.lua')
-rw-r--r--xmake/modules/utils/binary/bin2c.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/modules/utils/binary/bin2c.lua b/xmake/modules/utils/binary/bin2c.lua
index ce7336e36..34d9c4e02 100644
--- a/xmake/modules/utils/binary/bin2c.lua
+++ b/xmake/modules/utils/binary/bin2c.lua
@@ -21,6 +21,7 @@
-- imports
import("core.base.bytes")
import("core.base.option")
+import("core.base.binutils")
local options = {
{'w', "linewidth", "kv", nil, "Set the line width"},
@@ -98,8 +99,8 @@ function _do_bin2c(binarypath, outputpath, opt)
end
-- do dump
- if utils.bin2c then
- utils.bin2c(binarypath, outputpath, opt)
+ if binutils.bin2c then
+ binutils.bin2c(binarypath, outputpath, opt)
else
local binarydata = bytes(io.readfile(binarypath, {encoding = "binary"}))
local outputfile = io.open(outputpath, 'w')