fix lazy_import
This commit is contained in:
@@ -21,9 +21,9 @@ pub macro lazy_import ( $module:literal $($v:vis fn $name:ident($($pname:ident:
|
|||||||
let function = match unsafe { FUNC } {
|
let function = match unsafe { FUNC } {
|
||||||
Some(function) => function,
|
Some(function) => function,
|
||||||
None => unsafe {
|
None => unsafe {
|
||||||
let import = core::mem::transmute($crate::win32::importer::find_import_hashed(
|
let import = core::mem::transmute(find_import_hashed(
|
||||||
const { x::hash_utf8($module.as_bytes()) },
|
const { fnv1::hash_utf8($module.as_bytes()) },
|
||||||
const { x::hash_utf8(stringify!($name).as_bytes()) }
|
const { fnv1::hash_utf8(stringify!($name).as_bytes()) }
|
||||||
).unwrap_or(0));
|
).unwrap_or(0));
|
||||||
FUNC = Some(import);
|
FUNC = Some(import);
|
||||||
import
|
import
|
||||||
|
|||||||
Reference in New Issue
Block a user