Fix @EXPORT symbol macro
This commit is contained in:
parent
0bfbaed1dd
commit
c7f08b5c7a
|
@ -68,7 +68,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gmod"
|
name = "gmod"
|
||||||
version = "0.1.0"
|
version = "0.1.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cstr",
|
"cstr",
|
||||||
"ctor",
|
"ctor",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "gmod"
|
name = "gmod"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
authors = ["William Venner <william@venner.io>"]
|
authors = ["William Venner <william@venner.io>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
|
@ -65,7 +65,7 @@ macro_rules! __hook_func {
|
||||||
/// Common pattern for detouring.
|
/// Common pattern for detouring.
|
||||||
macro_rules! find_gmod_signature {
|
macro_rules! find_gmod_signature {
|
||||||
(($library:ident, $library_path:ident), @EXPORT = $export:literal) => {
|
(($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) => {
|
(($library:ident, $library_path:ident), @SIG = $sig:literal) => {
|
||||||
|
|
Loading…
Reference in New Issue