MCPcopy Create free account
hub / github.com/Snapchat/Valdi / nativeGetArrayLength

Function nativeGetArrayLength

valdi/src/valdi/android/MarshallerJNI.cpp:674–686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

672}
673
674jint nativeGetArrayLength(JNIEnv* env, jclass /*cls*/, jlong ptr, jint index) {
675 auto* marshaller = unwrap(env, ptr);
676 if (marshaller == nullptr) {
677 return 0;
678 }
679
680 auto arrayLength = marshaller->getArrayLength(static_cast<int>(index));
681 if (!checkMarshaller(env, marshaller)) {
682 return 0;
683 }
684
685 return static_cast<jint>(arrayLength);
686}
687
688jint nativeGetArrayItem(JNIEnv* env, jclass /*cls*/, jlong ptr, jint index, jint arrayIndex) {
689 auto* marshaller = unwrap(env, ptr);

Callers 1

getListLengthMethod · 0.85

Calls 3

unwrapFunction · 0.85
checkMarshallerFunction · 0.85
getArrayLengthMethod · 0.80

Tested by

no test coverage detected