static jint android_content_XmlBlock_nativeGetAttributeCount(JNIEnv* env, jobject clazz, jint token) { ResXMLParser* st = (ResXMLParser*)token; if (st == NULL) { doThrow(env, "java/lang/NullPointerException"); return 0; } return (jint)st->getAttributeCount(); }
static jint android_content_XmlBlock_nativeGetAttributeCount(JNIEnv* env, jobject clazz, jlong token) { ResXMLParser* st = reinterpret_cast<ResXMLParser*>(token); if (st == NULL) { jniThrowNullPointerException(env, NULL); return 0; } return static_cast<jint>(st->getAttributeCount()); }