JNIEXPORT jint JNICALL Java_es_gva_cit_jogr_JNIBase_referenceNat (JNIEnv *env, jobject obj, jlong cPtr){ OGRDataSource *ds = (OGRDataSource *) 0 ; int res=-1; ds = *(OGRDataSource **)&cPtr; if(ds!=NULL){ res=ds->Reference(); } return res; }