summaryrefslogtreecommitdiffstats
path: root/src/H5Tpkg.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-08-11 12:43:04 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-08-11 12:43:04 (GMT)
commited92f54f9bae998ffe1f686f4f4ea61cd4bbdade (patch)
treef60eb3cc97b756e34c63a20f030dd981ea44df85 /src/H5Tpkg.h
parent8de0645dfa17c22f6a8ee58361f7d4b7ce2755ae (diff)
downloadhdf5-ed92f54f9bae998ffe1f686f4f4ea61cd4bbdade.zip
hdf5-ed92f54f9bae998ffe1f686f4f4ea61cd4bbdade.tar.gz
hdf5-ed92f54f9bae998ffe1f686f4f4ea61cd4bbdade.tar.bz2
[svn-r7334] Purpose:
Bug fix Description: Object references were not getting written out correctly to the file, with recent changes to their memory structure. Solution: Convert the object references correctly. Platforms tested: h5committested
Diffstat (limited to 'src/H5Tpkg.h')
-rw-r--r--src/H5Tpkg.h48
1 files changed, 25 insertions, 23 deletions
diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h
index 6fccdba..8a6b68d 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -65,14 +65,6 @@ struct H5T_path_t {
H5T_cdata_t cdata; /*data for this function */
};
-/* VL types */
-typedef enum {
- H5T_VLEN_BADTYPE = -1, /* invalid VL Type */
- H5T_VLEN_SEQUENCE=0, /* VL sequence */
- H5T_VLEN_STRING, /* VL string */
- H5T_VLEN_MAXTYPE /* highest type (Invalid as true type) */
-} H5T_vlen_type_t;
-
typedef struct H5T_atomic_t {
H5T_order_t order; /*byte order */
size_t prec; /*precision in bits */
@@ -102,6 +94,7 @@ typedef struct H5T_atomic_t {
struct {
H5R_type_t rtype; /*type of reference stored */
+ H5T_loc_t loc; /* Location of data in buffer */
} r; /*reference types */
} u;
} H5T_atomic_t;
@@ -117,20 +110,20 @@ typedef enum H5T_sort_t {
typedef struct H5T_compnd_t {
int nalloc; /*num entries allocated in MEMB array*/
int nmembs; /*number of members defined in struct*/
- H5T_sort_t sorted; /*how are members sorted? */
- hbool_t has_array; /* Set if this type has an array datatype member */
- /* and should be written with the new version of */
- /* the datatype object header message */
- struct H5T_cmemb_t *memb; /*array of struct members */
+ H5T_sort_t sorted; /*how are members sorted? */
+ hbool_t has_array; /* Set if this type has an array datatype member */
+ /* and should be written with the new version of */
+ /* the datatype object header message */
+ struct H5T_cmemb_t *memb; /*array of struct members */
} H5T_compnd_t;
/* An enumeration data type */
typedef struct H5T_enum_t {
int nalloc; /*num entries allocated */
int nmembs; /*number of members defined in enum */
- H5T_sort_t sorted; /*how are members sorted? */
- uint8_t *value; /*array of values */
- char **name; /*array of symbol names */
+ H5T_sort_t sorted; /*how are members sorted? */
+ uint8_t *value; /*array of values */
+ char **name; /*array of symbol names */
} H5T_enum_t;
/* VL function pointers */
@@ -138,10 +131,18 @@ typedef hssize_t (*H5T_vlen_getlenfunc_t)(H5F_t *f, void *vl_addr);
typedef herr_t (*H5T_vlen_readfunc_t)(H5F_t *f, hid_t dxpl_id, void *vl_addr, void *buf, size_t len);
typedef herr_t (*H5T_vlen_writefunc_t)(H5F_t *f, hid_t dxpl_id, void *vl_addr, void *buf, void *bg_addr, hsize_t seq_len, hsize_t base_size);
+/* VL types */
+typedef enum {
+ H5T_VLEN_BADTYPE = -1, /* invalid VL Type */
+ H5T_VLEN_SEQUENCE=0, /* VL sequence */
+ H5T_VLEN_STRING, /* VL string */
+ H5T_VLEN_MAXTYPE /* highest type (Invalid as true type) */
+} H5T_vlen_type_t;
+
/* A VL datatype */
typedef struct H5T_vlen_t {
H5T_vlen_type_t type; /* Type of VL data in buffer */
- H5T_vlen_loc_t loc; /* Location of VL data in buffer */
+ H5T_loc_t loc; /* Location of VL data in buffer */
H5T_cset_t cset; /* For VL string. character set */
H5T_str_t pad; /* For VL string. space or null padding of
* extra bytes */
@@ -158,9 +159,9 @@ typedef struct H5T_opaque_t {
/* An array datatype */
typedef struct H5T_array_t {
- size_t nelem; /* total number of elements in array */
+ size_t nelem; /* total number of elements in array */
int ndims; /* member dimensionality */
- size_t dim[H5S_MAX_RANK]; /* size in each dimension */
+ size_t dim[H5S_MAX_RANK]; /* size in each dimension */
int perm[H5S_MAX_RANK]; /* index permutation */
} H5T_array_t;
@@ -178,15 +179,15 @@ struct H5T_t {
H5F_t *sh_file;/*file pointer if this is a shared type */
H5T_class_t type; /*which class of type is this? */
size_t size; /*total size of an instance of this type */
- hbool_t force_conv; /* Set if this type always needs to be converted and H5T_conv_noop cannot be called */
+ hbool_t force_conv;/* Set if this type always needs to be converted and H5T_conv_noop cannot be called */
struct H5T_t *parent;/*parent type for derived data types */
union {
H5T_atomic_t atomic; /* an atomic data type */
H5T_compnd_t compnd; /* a compound data type (struct) */
- H5T_enum_t enumer; /* an enumeration type (enum) */
- H5T_vlen_t vlen; /* a variable-length datatype */
+ H5T_enum_t enumer; /* an enumeration type (enum) */
+ H5T_vlen_t vlen; /* a variable-length datatype */
H5T_opaque_t opaque; /* an opaque data type */
- H5T_array_t array; /* an array datatype */
+ H5T_array_t array; /* an array datatype */
} u;
};
@@ -854,6 +855,7 @@ H5_DLL herr_t H5T_vlen_str_mem_write(H5F_t *f, hid_t dxpl_id, void *vl_addr, voi
H5_DLL hssize_t H5T_vlen_disk_getlen(H5F_t *f, void *vl_addr);
H5_DLL herr_t H5T_vlen_disk_read(H5F_t *f, hid_t dxpl_id, void *vl_addr, void *_buf, size_t len);
H5_DLL herr_t H5T_vlen_disk_write(H5F_t *f, hid_t dxpl_id, void *vl_addr, void *_buf, void *bg_addr, hsize_t seq_len, hsize_t base_size);
+H5_DLL htri_t H5T_vlen_set_loc(H5T_t *dt, H5F_t *f, H5T_loc_t loc);
/* Array functions */
H5_DLL H5T_t * H5T_array_create(H5T_t *base, int ndims,