mirror of
https://github.com/vxcontrol/lualibs-dynasm.git
synced 2026-07-01 13:19:14 -04:00
fixed loading of both dasm_x64 and dasm_x86 in the same luastate (luapower needs this for checking dependencies)
This commit is contained in:
+9
-20
@@ -1,22 +1,11 @@
|
||||
------------------------------------------------------------------------------
|
||||
-- DynASM x64 module.
|
||||
--
|
||||
-- Copyright (C) 2005-2015 Mike Pall. All rights reserved.
|
||||
-- See dynasm.lua for full copyright notice.
|
||||
------------------------------------------------------------------------------
|
||||
-- This module just sets 64 bit mode for the combined x86/x64 module.
|
||||
-- All the interesting stuff is there.
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
--unload dasm_x86 if it's already loaded.
|
||||
-- DynASM x64 loader module.
|
||||
|
||||
--unload dasm_x86x64 if it's already loaded.
|
||||
if not package then package = {loaded = {}} end --for compat. with minilua
|
||||
local dasm_x86 = package.loaded.dasm_x86
|
||||
package.loaded.dasm_x86 = nil
|
||||
|
||||
x64 = true -- Using a global is an ugly, but effective solution.
|
||||
local dasm_x64 = require("dasm_x86")
|
||||
|
||||
package.loaded.dasm_x86 = dasm_x86 --put it back
|
||||
|
||||
return dasm_x64
|
||||
|
||||
package.loaded.dasm_x86x64 = nil
|
||||
dasm_x64 = true -- Using a global is an ugly, but effective solution.
|
||||
local dasm = require'dasm_x86x64'
|
||||
dasm_x64 = nil
|
||||
package.loaded.dasm_x86x64 = true
|
||||
return dasm
|
||||
|
||||
+9
-2396
File diff suppressed because it is too large
Load Diff
+2399
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user