p≡p for Java
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
520 B

#include "foundation_pEp_jniadapter_AndroidHelper.h"
#include <stdlib.h>
extern "C" {
JNIEXPORT jint JNICALL Java_foundation_pEp_jniadapter_AndroidHelper_setenv
(JNIEnv* env, jclass clazz, jstring key, jstring value, jboolean overwrite)
char* k = (char *) env->GetStringUTFChars(key, NULL);
char* v = (char *) env->GetStringUTFChars(value, NULL);
int err = setenv(k, v, overwrite);
env->ReleaseStringUTFChars(key, k);
env->ReleaseStringUTFChars(value, v);
return err;
} // extern "C"