summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-04-30 13:55:51 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-04-30 13:55:51 (GMT)
commit60754030c75ad737d5b09af1cdfba4b4e153effd (patch)
treef6d194a3d3608131894a940acf59117df2ebbac5
parentd67139f909c61b6809b525a39b8b72a0567220b2 (diff)
downloadhdf5-60754030c75ad737d5b09af1cdfba4b4e153effd.zip
hdf5-60754030c75ad737d5b09af1cdfba4b4e153effd.tar.gz
hdf5-60754030c75ad737d5b09af1cdfba4b4e153effd.tar.bz2
[svn-r6784] Purpose:
Bug fix Description: Corrected a couple of problems with Ray's v1.4 compat checkin yesterday. Platforms tested: FreeBSD 4.8 (sleipnir) w/ & w/o --enable_hdf5v1_4 compat switch Triple check unnecessary.
-rw-r--r--src/H5R.c29
-rw-r--r--src/H5Rpublic.h5
2 files changed, 23 insertions, 11 deletions
diff --git a/src/H5R.c b/src/H5R.c
index 77f8306..c9a28c1 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -40,7 +40,7 @@ static herr_t H5R_create(void *ref, H5G_entry_t *loc, const char *name,
H5R_type_t ref_type, H5S_t *space, hid_t dxpl_id);
static hid_t H5R_dereference(H5F_t *file, hid_t dxpl_id, H5R_type_t ref_type, void *_ref);
static H5S_t * H5R_get_region(H5F_t *file, hid_t dxpl_id, H5R_type_t ref_type, void *_ref);
-static H5G_obj_t H5R_get_obj_type(H5F_t *file, hid_t dxpl_id, H5R_type_t ref_type, void *_ref);
+static int H5R_get_obj_type(H5F_t *file, hid_t dxpl_id, H5R_type_t ref_type, void *_ref);
/*--------------------------------------------------------------------------
@@ -337,7 +337,7 @@ H5R_dereference(H5F_t *file, hid_t dxpl_id, H5R_type_t ref_type, void *_ref)
H5T_t *datatype; /* Pointer to datatype to open */
H5G_entry_t ent; /* Symbol table entry */
uint8_t *p; /* Pointer to OID to store */
- H5G_obj_t oid_type; /* type of object being dereferenced */
+ int oid_type; /* type of object being dereferenced */
hid_t ret_value;
FUNC_ENTER_NOINIT(H5R_dereference);
@@ -647,13 +647,13 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-static H5G_obj_t
-H5R_get_object_type(H5F_t *file, void *_ref)
+static int
+H5R_get_object_type(H5F_t *file, hid_t dxpl_id, void *_ref)
{
H5G_entry_t ent; /* Symbol table entry */
hobj_ref_t *ref=(hobj_ref_t *)_ref; /* Only object references currently supported */
uint8_t *p; /* Pointer to OID to store */
- H5G_obj_t ret_value;
+ int ret_value;
FUNC_ENTER_NOINIT(H5R_get_object_type);
@@ -670,7 +670,7 @@ H5R_get_object_type(H5F_t *file, void *_ref)
H5F_addr_decode(ent.file,(const uint8_t **)&p,&(ent.header));
/* Get the OID type */
- ret_value=H5G_get_type(&ent, H5P_DEFAULT);
+ ret_value=H5G_get_type(&ent, dxpl_id);
#ifdef LATER
done:
@@ -721,7 +721,7 @@ H5Rget_object_type(hid_t id, void *_ref)
file=loc->file;
/* Get the object information */
- if ((ret_value=H5R_get_object_type(file,_ref))<0)
+ if ((ret_value=H5R_get_object_type(file,H5AC_ind_dxpl_id,_ref))<0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, H5G_UNKNOWN, "unable to determine object type");
done:
@@ -752,12 +752,12 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-static H5G_obj_t
+static int
H5R_get_obj_type(H5F_t *file, hid_t dxpl_id, H5R_type_t ref_type, void *_ref)
{
H5G_entry_t ent; /* Symbol table entry */
uint8_t *p; /* Pointer to OID to store */
- H5G_obj_t ret_value;
+ int ret_value;
FUNC_ENTER_NOINIT(H5R_get_obj_type);
@@ -849,12 +849,21 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
+#ifdef H5_WANT_H5_V1_4_COMPAT
int
H5Rget_obj_type(hid_t id, H5R_type_t ref_type, void *_ref)
+#else /* H5_WANT_H5_V1_4_COMPAT */
+H5G_obj_t
+H5Rget_obj_type(hid_t id, H5R_type_t ref_type, void *_ref)
+#endif /* H5_WANT_H5_V1_4_COMPAT */
{
H5G_entry_t *loc = NULL; /* Symbol table entry */
H5F_t *file=NULL; /* File object */
- hid_t ret_value;
+#ifdef H5_WANT_H5_V1_4_COMPAT
+ int ret_value;
+#else /* H5_WANT_H5_V1_4_COMPAT */
+ H5G_obj_t ret_value;
+#endif /* H5_WANT_H5_V1_4_COMPAT */
FUNC_ENTER_API(H5Rget_obj_type, H5G_UNKNOWN);
H5TRACE3("Is","iRtx",id,ref_type,_ref);
diff --git a/src/H5Rpublic.h b/src/H5Rpublic.h
index 393dfcb..cadc826 100644
--- a/src/H5Rpublic.h
+++ b/src/H5Rpublic.h
@@ -20,6 +20,7 @@
/* Public headers needed by this file */
#include "H5public.h"
+#include "H5Gpublic.h"
#include "H5Ipublic.h"
/*
@@ -74,8 +75,10 @@ H5_DLL hid_t H5Rdereference(hid_t dataset, H5R_type_t ref_type, void *ref);
H5_DLL hid_t H5Rget_region(hid_t dataset, H5R_type_t ref_type, void *ref);
#ifdef H5_WANT_H5_V1_4_COMPAT
H5_DLL int H5Rget_object_type(hid_t dataset, void *_ref);
+H5_DLL int H5Rget_obj_type(hid_t id, H5R_type_t ref_type, void *_ref);
+#else /* H5_WANT_H5_V1_4_COMPAT */
+H5_DLL H5G_obj_t H5Rget_obj_type(hid_t id, H5R_type_t ref_type, void *_ref);
#endif /* H5_WANT_H5_V1_4_COMPAT */
-H5_DLL int H5Rget_obj_type(hid_t dataset, H5R_type_t ref_type, void *_ref);
#ifdef __cplusplus
}