summaryrefslogtreecommitdiffstats
path: root/src/H5Gpublic.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Gpublic.h')
-rw-r--r--src/H5Gpublic.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/H5Gpublic.h b/src/H5Gpublic.h
index 54db123..febb6c7 100644
--- a/src/H5Gpublic.h
+++ b/src/H5Gpublic.h
@@ -52,6 +52,7 @@ typedef enum H5G_link_t {
* application is running. An object may satisfy the `isa' function for more
* than one type.
*/
+#ifdef TRY
#define H5G_UNKNOWN (-1) /* Unknown object type */
#define H5G_LINK 0 /* Object is a symbolic link */
#define H5G_GROUP 1 /* Object is a group */
@@ -61,6 +62,19 @@ typedef enum H5G_link_t {
#define H5G_RESERVED_5 5 /* Reserved for future use */
#define H5G_RESERVED_6 6 /* Reserved for future use */
#define H5G_RESERVED_7 7 /* Reserved for future use */
+#else
+typedef enum H5G_obj_t {
+ H5G_UNKNOWN = -1, /* Unknown object type */
+ H5G_LINK, /* Object is a symbolic link */
+ H5G_GROUP, /* Object is a group */
+ H5G_DATASET, /* Object is a dataset */
+ H5G_TYPE, /* Object is a named data type */
+ H5G_RESERVED_4, /* Reserved for future use */
+ H5G_RESERVED_5, /* Reserved for future use */
+ H5G_RESERVED_6, /* Reserved for future use */
+ H5G_RESERVED_7 /* Reserved for future use */
+} H5G_obj_t;
+#endif /*TRY*/
#define H5G_NTYPES 256 /* Max possible number of types */
#define H5G_NLIBTYPES 8 /* Number of internal types */
@@ -72,7 +86,7 @@ typedef struct H5G_stat_t {
unsigned long fileno[2]; /*file number */
unsigned long objno[2]; /*object number */
unsigned nlink; /*number of hard links to object*/
- int type; /*basic object type */
+ H5G_obj_t type; /*basic object type */
time_t mtime; /*modification time */
size_t linklen; /*symbolic link value length */
} H5G_stat_t;
@@ -93,7 +107,7 @@ H5_DLL herr_t H5Giterate(hid_t loc_id, const char *name, int *idx,
H5G_iterate_t op, void *op_data);
H5_DLL herr_t H5Gget_num_objs(hid_t loc_id, hsize_t *num_objs);
H5_DLL ssize_t H5Gget_objname_by_idx(hid_t group_id, hsize_t idx, char* name, size_t size);
-H5_DLL int H5Gget_objtype_by_idx(hid_t group_id, hsize_t idx);
+H5_DLL H5G_obj_t H5Gget_objtype_by_idx(hid_t group_id, hsize_t idx);
H5_DLL herr_t H5Gmove2(hid_t src_loc, const char *src, hid_t dst_loc,
const char *dst);
H5_DLL herr_t H5Glink2(hid_t src_loc, const char *cur_name, H5G_link_t type,