summaryrefslogtreecommitdiffstats
path: root/src/H5Tconv.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-02-25 20:31:17 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-02-25 20:31:17 (GMT)
commitad73f18f5e759c4bd3d12c331659a24b54d0c39a (patch)
tree660a8bb32cc118a647757c5ae2321cf9b1ca9073 /src/H5Tconv.c
parentc543632ba5cd609d2e6303fa9cf55685568fa851 (diff)
downloadhdf5-ad73f18f5e759c4bd3d12c331659a24b54d0c39a.zip
hdf5-ad73f18f5e759c4bd3d12c331659a24b54d0c39a.tar.gz
hdf5-ad73f18f5e759c4bd3d12c331659a24b54d0c39a.tar.bz2
[svn-r298] Changes since 19980219
---------------------- ./html/Files.html ./src/H5C.c ./src/H5Cpublic.h ./src/H5Ffamily.c ./src/H5Fprivate.h ./src/H5Fsplit.c ./test/tstab.c Added file-access property functions. The split driver takes file extensions as properties. ./src/H5A.c ./src/H5Aprivate.h Added some comments. Changed H5A_destroy() to call the free function on all the atoms that are destroyed. This fixes a bug where the file boot block isn't updated if the file isn't closed before calling exit(). Removed extra `*' and `&' from some places. ./src/H5AC.c Replaced an occurrence of NO_ADDR with NULL. ./src/H5Odtype.c ./src/H5T.c ./src/H5Tconv.c ./src/H5Tpkg.h Data types of compound members are pointers. ./H5private.h Some changes to make lseek64() work on Irix 5.3 where header files don't realize that `long long' works. ./acconfig.h ./configure.in Removed definition for PHDF5 since it looks like everyone is useing HAVE_PARALLEL now. ./configure.in ./src/H5detec.c Added checks for gethostname() and getpwuid().
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r--src/H5Tconv.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 5ef27ed..604569c 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -254,12 +254,12 @@ H5T_conv_struct_init (H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
}
}
if (priv->src2dst[i]>=0) {
- type = &(src->u.compnd.memb[i].type);
+ type = H5T_copy (src->u.compnd.memb[i].type);
tid = H5A_register (H5_DATATYPE, type);
assert (tid>=0);
priv->src_memb_id[priv->src2dst[i]] = tid;
- type = &(dst->u.compnd.memb[priv->src2dst[i]].type);
+ type = H5T_copy (dst->u.compnd.memb[priv->src2dst[i]].type);
tid = H5A_register (H5_DATATYPE, type);
assert (tid>=0);
priv->dst_memb_id[priv->src2dst[i]] = tid;
@@ -469,7 +469,8 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
src_memb = src->u.compnd.memb + i;
dst_memb = dst->u.compnd.memb + src2dst[i];
- if (dst_memb->type.size <= src_memb->type.size) {
+ if (H5T_get_size (dst_memb->type) <=
+ H5T_get_size (src_memb->type)) {
H5T_conv_t tconv_func = priv->memb_conv[src2dst[i]];
H5T_cdata_t *memb_cdata = priv->memb_cdata[src2dst[i]];
memb_cdata->command = H5T_CONV_CONV;
@@ -481,12 +482,12 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
bkg + dst_memb->offset);
HDmemmove (buf + offset, buf + src_memb->offset,
- dst_memb->type.size);
- offset += dst_memb->type.size;
+ H5T_get_size (dst_memb->type));
+ offset += H5T_get_size (dst_memb->type);
} else {
HDmemmove (buf + offset, buf + src_memb->offset,
- src_memb->type.size);
- offset += src_memb->type.size;
+ H5T_get_size (src_memb->type));
+ offset += H5T_get_size (src_memb->type);
}
}
@@ -501,9 +502,10 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if (src2dst[i]<0) continue;
src_memb = src->u.compnd.memb + i;
dst_memb = dst->u.compnd.memb + src2dst[i];
- offset -= dst_memb->type.size;
+ offset -= H5T_get_size (dst_memb->type);
- if (dst_memb->type.size > src_memb->type.size) {
+ if (H5T_get_size (dst_memb->type) >
+ H5T_get_size (src_memb->type)) {
H5T_conv_t tconv_func = priv->memb_conv[src2dst[i]];
H5T_cdata_t *memb_cdata = priv->memb_cdata[src2dst[i]];
memb_cdata->command = H5T_CONV_CONV;
@@ -512,7 +514,7 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
buf + offset, bkg + dst_memb->offset);
}
HDmemmove (bkg+dst_memb->offset, buf+offset,
- dst_memb->type.size);
+ H5T_get_size (dst_memb->type));
}
assert (0==offset);