Lines Matching refs:ldbt
1300 DBT_LOCKED *ldbt = dbt->app_data;
1301 JNIEnv *jenv = ldbt->jenv;
1324 (*jenv)->GetByteArrayRegion(jenv, ldbt->jarr, ldbt->offset +
1332 if (offset == 0 && (!ldbt->reuse ||
1333 (jsize)(ldbt->offset + dbt->size) > ldbt->array_len)) {
1334 if (ldbt->jarr != NULL)
1335 (*jenv)->DeleteLocalRef(jenv, ldbt->jarr);
1336 ldbt->jarr = (*jenv)->NewByteArray(jenv, (jsize)dbt->size);
1337 if (ldbt->jarr == NULL)
1339 (*jenv)->SetObjectField(jenv, ldbt->jdbt, dbt_data_fid, ldbt->jarr);
1341 ldbt->offset = 0;
1343 (*jenv)->SetByteArrayRegion(jenv, ldbt->jarr, ldbt->offset +
1370 JNIEnv *jenv, DBT_LOCKED *ldbt, DBT **dbtp, jobject jdbt, int allow_null)
1375 memset(ldbt, 0, sizeof (*ldbt));
1376 ldbt->jenv = jenv;
1377 ldbt->jdbt = jdbt;
1389 dbt = &ldbt->dbt;
1393 ldbt->jdata_nio = (*jenv)->GetObjectField(jenv, jdbt, dbt_data_nio_fid);
1394 if (ldbt->jdata_nio != NULL)
1397 ldbt->jarr = (jbyteArray)(*jenv)->GetObjectField(jenv, jdbt, dbt_data_fid);
1398 ldbt->offset = (*jenv)->GetIntField(jenv, jdbt, dbt_offset_fid);
1400 ldbt->orig_size = dbt->size;
1419 ldbt->reuse = !F_ISSET(dbt, DB_DBT_MALLOC);
1424 if (ldbt->jdata_nio != NULL) {
1426 ldbt->jdata_nio);
1431 ldbt->array_len = (u_int32_t)capacity;
1432 } else if (ldbt->jarr == NULL) {
1442 ldbt->array_len = ldbt->offset = dbt->size = dbt->ulen = 0;
1444 ldbt->array_len = (*jenv)->GetArrayLength(jenv, ldbt->jarr);
1447 if (ldbt->offset < 0)
1455 if ((jsize)(ldbt->offset + dbt->ulen) > ldbt->array_len)
1461 if (ldbt->jdata_nio) {
1463 ldbt->jdata_nio);
1464 dbt->data = (u_int8_t *)dbt->data + ldbt->offset;
1466 if (ldbt->jarr != NULL &&
1468 ldbt->jarr, NULL)) == NULL)
1470 dbt->data = (u_int8_t *)dbt->data + ldbt->offset;
1473 dbt->app_data = ldbt;
1479 JNIEnv *jenv, jobject jdbt, DBT *dbt, DBT_LOCKED *ldbt) {
1485 if (dbt->size != ldbt->orig_size)
1489 if (ldbt->jarr != NULL)
1490 (*jenv)->ReleaseByteArrayElements(jenv, ldbt->jarr,
1491 (jbyte *)dbt->data - ldbt->offset, 0);