コード例 #1
0
ファイル: h5oImp.c プロジェクト: ngcurrier/ProteusCFD
/*
 * Class:     hdf_hdf5lib_H5
 * Method:    H5Odecr_refcount
 * Signature: (J)V
 */
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Odecr_1refcount
    (JNIEnv *env, jclass clss, jlong object_id)
{
    if (H5Odecr_refcount((hid_t)object_id) < 0)
        h5libraryError(env);
}
コード例 #2
0
ファイル: h5oImp.c プロジェクト: soumagne/hdf5
/*
 * Class:     hdf_hdf5lib_H5
 * Method:    H5Odecr_refcount
 * Signature: (J)V
 */
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Odecr_1refcount
    (JNIEnv *env, jclass clss, jlong object_id)
{
    UNUSED(clss);

    if (H5Odecr_refcount((hid_t)object_id) < 0)
        H5_LIBRARY_ERROR(ENVONLY);

done:
    return;
}
コード例 #3
0
/****if* H5Of/h5odecr_refcount_c
 * NAME
 *  h5odecr_refcount_c
 * PURPOSE
 *  Calls H5Odecr_refcount
 * INPUTS
 *  object_id - Object identifier.
 * RETURNS
 *  0 on success, -1 on failure
 * AUTHOR
 *  M. Scot Breitenfeld
 *  May 16, 2012
 * SOURCE
*/
int_f
nh5odecr_refcount_c (hid_t_f *object_id)
/******/
{
  int_f ret_value = 0;  /* Return value */

  /*
   * Call H5Odecr_refcount function.
   */
  if((hid_t_f)H5Odecr_refcount((hid_t)*object_id) < 0)
    HGOTO_DONE(FAIL);

 done:
  return ret_value;
}
コード例 #4
0
ファイル: h5_extlink.c プロジェクト: ngcurrier/ProteusCFD
/* UD_hard_delete
 * Since the creation function increments the object's reference count, it's
 * important to decrement it again when the link is deleted.
 */
static herr_t UD_hard_delete(const char *link_name, hid_t loc_group,
    const void *udata, size_t udata_size)
{
    haddr_t addr;
    hid_t target_obj = -1;
    herr_t ret_value = 0;

    /* Sanity check; we have already verified the udata's size in the creation
     * callback.
     */
    if(udata_size != sizeof(haddr_t))
    {
      ret_value = -1;
      goto done;
    }

    addr = *((const haddr_t *) udata);

    /* Open the object this link points to */
    target_obj= H5Oopen_by_addr(loc_group, addr);
    if(target_obj < 0)
    {
      ret_value = -1;
      goto done;
    }

    /* Decrement the reference count of the target object */
    if(H5Odecr_refcount(target_obj) < 0)
    {
      ret_value = -1;
      goto done;
    }

done:
    /* Close the target object if we opened it */
    if(target_obj >= 0)
        H5Oclose(target_obj);
    return ret_value;
}