update compat
[lttv.git] / ltt-usertrace / java / ltt-java-string.c
1
2 #include <jni.h>
3 #include "Sample.h"
4 #include <stdio.h>
5 #include <unistd.h>
6
7 #define LTT_TRACE
8 #define LTT_BLOCKING 1
9 #include <ltt/ltt-facility-user_generic.h>
10
11 JNIEXPORT void JNICALL Java_Sample_trace_1java_1generic_1string
12 (JNIEnv *env, jobject obj, jstring jstr)
13 {
14 const char *str;
15 str = (*env)->GetStringUTFChars(env, jstr, NULL);
16 if (str == NULL) return; // out of memory error thrown
17 trace_user_generic_string(str);
18 (*env)->ReleaseStringUTFChars(env, jstr, str);
19 }
20
This page took 0.048936 seconds and 4 git commands to generate.