rem: lua_State* L; jclass classCPtr = ( *env )->GetObjectClass( env , cptr ); jfieldID CPtr_peer_ID = ( *env )->GetFieldID( env , classCPtr , "peer" , "J" ); jbyte *peer = ( jbyte * )( *env )->GetLongField( env , cptr , CPtr_peer_ID );  L = ( lua_State * ) peer ;
add: lua_State * L = getStateFromCPtr( env , cptr );
context: JNIEXPORT jboolean JNICALL Java_luajava_LuaState__1isObject  (JNIEnv * env , jobject jobj , jobject cptr , jint index ){   /* Get luastate */   lua_State* L;   jclass classCPtr = ( *env )->GetObjectClass( env , cptr );   jfieldID CPtr_peer_ID = ( *env )->GetFieldID( env , classCPtr , "peer" , "J" );   jbyte *peer = ( jbyte * )( *env )->GetLongField( env , cptr , CPtr_peer_ID );   L = ( lua_State * ) peer ;   return (isJavaObject( L , index ) ? JNI_TRUE : JNI_FALSE );}