mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-04-25 02:34:24 +00:00
Make Api functions inline
Make Api functions inline to avoid duplicate symbols when including api.hpp in multiple cpps
This commit is contained in:
parent
ff3f377911
commit
e34e04af04
@ -273,22 +273,22 @@ void entry_impl(api_table *table, JNIEnv *env) {
|
|||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
|
||||||
int Api::connectCompanion() {
|
inline int Api::connectCompanion() {
|
||||||
return impl->connectCompanion(impl->_this);
|
return impl->connectCompanion(impl->_this);
|
||||||
}
|
}
|
||||||
void Api::setOption(Option opt) {
|
inline void Api::setOption(Option opt) {
|
||||||
impl->setOption(impl->_this, opt);
|
impl->setOption(impl->_this, opt);
|
||||||
}
|
}
|
||||||
void Api::hookJniNativeMethods(JNIEnv *env, const char *className, JNINativeMethod *methods, int numMethods) {
|
inline void Api::hookJniNativeMethods(JNIEnv *env, const char *className, JNINativeMethod *methods, int numMethods) {
|
||||||
impl->hookJniNativeMethods(env, className, methods, numMethods);
|
impl->hookJniNativeMethods(env, className, methods, numMethods);
|
||||||
}
|
}
|
||||||
void Api::pltHookRegister(const char *regex, const char *symbol, void *newFunc, void **oldFunc) {
|
inline void Api::pltHookRegister(const char *regex, const char *symbol, void *newFunc, void **oldFunc) {
|
||||||
impl->pltHookRegister(regex, symbol, newFunc, oldFunc);
|
impl->pltHookRegister(regex, symbol, newFunc, oldFunc);
|
||||||
}
|
}
|
||||||
void Api::pltHookExclude(const char *regex, const char *symbol) {
|
inline void Api::pltHookExclude(const char *regex, const char *symbol) {
|
||||||
impl->pltHookExclude(regex, symbol);
|
impl->pltHookExclude(regex, symbol);
|
||||||
}
|
}
|
||||||
bool Api::pltHookCommit() {
|
inline bool Api::pltHookCommit() {
|
||||||
return impl->pltHookCommit();
|
return impl->pltHookCommit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user