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

Function nativePushFunction

valdi/src/valdi/android/MarshallerJNI.cpp:351–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349}
350
351jint nativePushFunction(JNIEnv* env,
352
353 jclass /*cls*/,
354 jlong ptr,
355 jobject function) {
356 auto* marshaller = unwrap(env, ptr);
357 if (marshaller == nullptr) {
358 return 0;
359 }
360 if (!checkNotNull(env, function)) {
361 return 0;
362 }
363
364 auto value = ValdiAndroid::valueFromJavaValdiFunction(ValdiAndroid::JavaEnv(), function);
365 return static_cast<jint>(marshaller->push(std::move(value)));
366}
367
368jint nativePushNull(jlong ptr) {
369 auto* marshaller = unwrap(nullptr, ptr);

Callers 1

pushFunctionMethod · 0.85

Calls 5

unwrapFunction · 0.85
checkNotNullFunction · 0.70
JavaEnvClass · 0.50
pushMethod · 0.45

Tested by

no test coverage detected