Fix @EXPORT symbol macro

This commit is contained in:
William Venner 2021-09-17 18:22:10 +01:00
parent 0bfbaed1dd
commit c7f08b5c7a
3 changed files with 3 additions and 3 deletions

2
Cargo.lock generated
View File

@ -68,7 +68,7 @@ dependencies = [
[[package]]
name = "gmod"
version = "0.1.0"
version = "0.1.2"
dependencies = [
"cstr",
"ctor",

View File

@ -1,6 +1,6 @@
[package]
name = "gmod"
version = "0.1.1"
version = "0.1.2"
authors = ["William Venner <william@venner.io>"]
edition = "2018"
license = "MIT"

View File

@ -65,7 +65,7 @@ macro_rules! __hook_func {
/// Common pattern for detouring.
macro_rules! find_gmod_signature {
(($library:ident, $library_path:ident), @EXPORT = $export:literal) => {
$library.get($export).ok().map(|func: Symbol<'static, _>| *func)
$library.get(concat!($export, '\0').as_bytes()).ok().map(|func: ::gmod::libloading::Symbol<'_, _>| *func)
};
(($library:ident, $library_path:ident), @SIG = $sig:literal) => {