In the code sample for accessing via "C", the env pointer is used like:
const char *str = (*env)->GetStringUTFChars(env, s, 0);
While for C++, the sample makes the same call:
const char *str = env->GetStringUTFChars(s, 0);
The document goes on to say:
With C++, the extra level of indirection and the interface pointer argument disappear from the source code. However, the underlying mechanism is exactly the same as with C. In C++, JNI functions are defined as inline member functions that expand to their C counterparts.
Does that statement mean that the C++ version would eventually expand to the C version and have the same level of indirection?
I haven't looked at the header files, but I'm puzzled. Can someone explain this difference?