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 } {
|
||||
Some(function) => function,
|
||||
None => unsafe {
|
||||
let import = core::mem::transmute($crate::win32::importer::find_import_hashed(
|
||||
const { x::hash_utf8($module.as_bytes()) },
|
||||
const { x::hash_utf8(stringify!($name).as_bytes()) }
|
||||
let import = core::mem::transmute(find_import_hashed(
|
||||
const { fnv1::hash_utf8($module.as_bytes()) },
|
||||
const { fnv1::hash_utf8(stringify!($name).as_bytes()) }
|
||||
).unwrap_or(0));
|
||||
FUNC = Some(import);
|
||||
import
|
||||
|
||||
Reference in New Issue
Block a user