Skip to content

Commit 6082f9b

Browse files
committed
Access xpcall_wrap via the modulepack module
1 parent a28f89c commit 6082f9b

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

TPT-Script-Manager

tptasm/detect.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
local printf = require("tptasm.printf")
2-
local xbit32 = require("tptasm.xbit32")
1+
local modulepack = require("modulepack")
2+
local printf = require("tptasm.printf")
3+
local xbit32 = require("tptasm.xbit32")
34

45
local function enumerate_standard(id)
56
if sim.partProperty(id, "ctype") == 0x1864A205
@@ -132,7 +133,7 @@ end
132133
local function all_cpus()
133134
local co = coroutine.create(function()
134135
local rethrow = false
135-
xpcall_wrap(function()
136+
modulepack.xpcall_wrap(function()
136137
enumerate_cpus()
137138
end, function(err)
138139
rethrow = true

tptasm/init.lua

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
local printf = require("tptasm.printf")
2-
local utility = require("tptasm.utility")
1+
local modulepack = require("modulepack")
2+
local printf = require("tptasm.printf")
3+
local utility = require("tptasm.utility")
34

45
local function main(...)
56
local exit_with = 0
@@ -11,7 +12,7 @@ local function main(...)
1112
end
1213

1314
local args = { ... }
14-
xpcall_wrap(function()
15+
modulepack.xpcall_wrap(function()
1516

1617
local detect = require("tptasm.detect")
1718
local archs = require("tptasm.archs")
@@ -172,7 +173,7 @@ end
172173

173174
local function run(...)
174175
if _G.tpt and select("#", ...) == 0 then
175-
_G.tptasm = xpcall_wrap(main)
176+
_G.tptasm = modulepack.xpcall_wrap(main)
176177
return
177178
end
178179
return main(...)

0 commit comments

Comments
 (0)