Hpmason / retour-utils

Other
4 stars 2 forks source link

Visibility of hooked modules doesn't maintain its visibility #1

Closed Hpmason closed 1 year ago

Hpmason commented 1 year ago

Visibility such as pub and pub(crate) of the module are lost after the macro modifies it.

// this
#[hook_module("Foo.dll")]
pub mod bar {

}

// becomes this, losing the `pub`
mod bar {
}

Just need to insert visibility here: https://github.com/Hpmason/retour-utils/blob/a19c56635cf384c3f4d5621caf4c3af915b427c4/impl/src/expand.rs#L18