Skip to content

Commit

Permalink
Fix broken imports and other stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
dargueta committed Oct 2, 2024
1 parent a092139 commit 71fecb2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/unicorn/engine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ end


-- These functions are only available in Unicorn 2.x.
if uc_c.version()[1] > 1 then
local unicorn_major_version = uc_c.version()
if unicorn_major_version >= 2 then
function Engine:ctl_exits_disable()
return uc_c.ctl_exits_disable(self.engine_handle_)
end
Expand Down
10 changes: 5 additions & 5 deletions src/unicorn/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ local M = {
--- @{unicorn_const.UC_ARCH_X86}.
--- @treturn bool A boolean indicating if Unicorn supports the given architecture.
--- @function arch_supported
arch_supported = uc.arch_supported,
arch_supported = uc_c.arch_supported,

--- Return the error message corresponding to the given Unicorn error code.
--- @tparam int code An error code as returned from one of the API functions.
--- @treturn string A standard error message describing the code.
--- @function strerror
strerror = uc.strerror,
strerror = uc_c.strerror,

--- Return a two-element table of the major and minor version numbers of the
--- underlying Unicorn Engine library.
--- Return two values, the major and minor version numbers of the underlying Unicorn
--- Engine C library.
--- @treturn {int,int} The major and minor version of the library, respectively.
--- @function version
version = uc.version,
version = uc_c.version,
}


Expand Down

0 comments on commit 71fecb2

Please sign in to comment.