if (jindex < 0 || jindex > JavaDOMGlobals::javaMaxInt) { PR_LOG(JavaDOMGlobals::log, PR_LOG_ERROR, ("NodeList.item: invalid index value (%d)\n", jindex)); return NULL; }
JNIEXPORT jobject JNICALL Java_org_mozilla_dom_NodeListImpl_item  (JNIEnv *env, jobject jthis, jint jindex){  nsIDOMNodeList* nodes = (nsIDOMNodeList*)     env->GetLongField(jthis, JavaDOMGlobals::nodeListPtrFID);  if (!nodes) {    PR_LOG(JavaDOMGlobals::log, PR_LOG_WARNING, 	   ("NodeList.item: NULL pointer\n"));    return NULL;  }  nsIDOMNode* node = NULL;  nsresult rv = nodes->Item((PRUint32) jindex, &node);  if (NS_FAILED(rv) || !node) {    PR_LOG(JavaDOMGlobals::log, PR_LOG_ERROR, 	   ("NodeList.item: failed (%x)\n", rv));    return NULL;  }  return JavaDOMGlobals::CreateNodeSubtype(env, node);}