static jint android_content_XmlBlock_nativeGetAttributeData(JNIEnv* env, jobject clazz,
                                                            jint token, jint idx)
{
    ResXMLParser* st = (ResXMLParser*)token;
    if (st == NULL) {
        doThrow(env, "java/lang/NullPointerException");
        return 0;
    }

    return (jint)st->getAttributeData(idx);
}
static jint android_content_XmlBlock_nativeGetAttributeData(JNIEnv* env, jobject clazz,
                                                            jlong token, jint idx)
{
    ResXMLParser* st = reinterpret_cast<ResXMLParser*>(token);
    if (st == NULL) {
        jniThrowNullPointerException(env, NULL);
        return 0;
    }

    return static_cast<jint>(st->getAttributeData(idx));
}