more [[gnu::...]] attributes
This commit is contained in:
@ -48,10 +48,10 @@ class File : public LocalObject {
|
||||
public:
|
||||
using LocalObject::LocalObject;
|
||||
|
||||
gcc_nonnull_all
|
||||
[[gnu::nonnull]]
|
||||
static void Initialise(JNIEnv *env) noexcept;
|
||||
|
||||
gcc_nonnull_all
|
||||
[[gnu::nonnull]]
|
||||
static jstring GetAbsolutePath(JNIEnv *env, jobject file) noexcept {
|
||||
return (jstring)env->CallObjectMethod(file,
|
||||
getAbsolutePath_method);
|
||||
@ -69,7 +69,7 @@ public:
|
||||
* Invoke File.getAbsolutePath() and release the
|
||||
* specified File reference.
|
||||
*/
|
||||
gcc_pure gcc_nonnull_all
|
||||
[[gnu::pure]] [[gnu::nonnull]]
|
||||
static AllocatedPath ToAbsolutePath(JNIEnv *env,
|
||||
jobject file) noexcept;
|
||||
};
|
||||
|
@ -30,8 +30,6 @@
|
||||
#ifndef JAVA_GLOBAL_HXX
|
||||
#define JAVA_GLOBAL_HXX
|
||||
|
||||
#include "util/Compiler.h"
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
namespace Java {
|
||||
@ -47,8 +45,9 @@ DetachCurrentThread() noexcept
|
||||
jvm->DetachCurrentThread();
|
||||
}
|
||||
|
||||
static inline gcc_pure
|
||||
JNIEnv *GetEnv() noexcept
|
||||
[[gnu::pure]]
|
||||
static inline JNIEnv *
|
||||
GetEnv() noexcept
|
||||
{
|
||||
JNIEnv *env;
|
||||
jvm->AttachCurrentThread(&env, nullptr);
|
||||
|
Reference in New Issue
Block a user