mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 21:15:56 +08:00
Style: Rename
This commit is contained in:
1 parent
8b0bf8f211
commit
cc52a25db4
5 files changed
+7
-253
No files matched your search
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <JuiceAgent/JuiceAgent.hpp>
|
||||
#include <string>
|
||||
#include <JuiceAgent/Logger.hpp>
|
||||
#include <jvm/jni.h>
|
||||
#include <jvm/jvmti.h>
|
||||
|
||||
namespace JuiceAgent::Loader
|
||||
{
|
||||
void entrypoint(const char* runtime_dir);
|
||||
|
||||
bool invoke_juiceagent_init(JNIEnv* env, const InjectionInfo& info);
|
||||
} // namespace JuiceAgent::Loader
|
||||
|
||||
namespace {
|
||||
// RAII wrapper for local JNI references
|
||||
template<typename T>
|
||||
class LocalRef {
|
||||
private:
|
||||
JNIEnv* env;
|
||||
T ref;
|
||||
public:
|
||||
LocalRef(JNIEnv* env, T ref) : env(env), ref(ref) {}
|
||||
~LocalRef() {
|
||||
if (ref) env->DeleteLocalRef(ref);
|
||||
}
|
||||
T get() const { return ref; }
|
||||
operator T() const { return ref; }
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user