summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-06-13 20:11:38 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-06-13 20:11:38 (GMT)
commit986f3352516ce62e401516d65a39dc27612abf8e (patch)
treeda0a6215fddd3a7d7182993906f02eb8873ca834 /src
parent925f2ba71017081543f904a6a113055432693dab (diff)
downloadhdf5-986f3352516ce62e401516d65a39dc27612abf8e.zip
hdf5-986f3352516ce62e401516d65a39dc27612abf8e.tar.gz
hdf5-986f3352516ce62e401516d65a39dc27612abf8e.tar.bz2
[svn-r8675] Purpose:
Code optimization Description: Using existing dataspace extent copying routine instead of duplicating the code (more slowly). Platforms tested: Solaris 2.7 (arabica) FreeBSD 4.10 (sleipnir) w/parallel Too minor to require h5committest
Diffstat (limited to 'src')
-rw-r--r--src/H5A.c4
-rw-r--r--src/H5Osdspace.c31
2 files changed, 7 insertions, 28 deletions
diff --git a/src/H5A.c b/src/H5A.c
index 5f3e219..5bce269 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -1591,10 +1591,6 @@ H5A_close(H5A_t *attr)
if(H5O_close(&(attr->ent))<0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release object header info")
-#ifndef LATER
- /* Do something with the shared information? */
-#endif
-
H5MM_xfree(attr);
done:
diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c
index 4f2515e..d558d33 100644
--- a/src/H5Osdspace.c
+++ b/src/H5Osdspace.c
@@ -314,26 +314,9 @@ H5O_sdspace_copy(const void *mesg, void *dest)
if (!dst && NULL==(dst = H5FL_MALLOC(H5S_extent_t)))
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
- /* deep copy -- pointed-to values are copied also */
- HDmemcpy(dst, src, sizeof(H5S_extent_t));
-
- if (src->u.simple.size) {
- if (NULL==(dst->u.simple.size = H5FL_ARR_MALLOC(hsize_t,src->u.simple.rank)))
- HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
- HDmemcpy (dst->u.simple.size, src->u.simple.size, src->u.simple.rank*sizeof(src->u.simple.size[0]));
- }
- if (src->u.simple.max) {
- if (NULL==(dst->u.simple.max=H5FL_ARR_MALLOC(hsize_t,src->u.simple.rank)))
- HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
- HDmemcpy (dst->u.simple.max, src->u.simple.max, src->u.simple.rank*sizeof(src->u.simple.max[0]));
- }
-#ifdef LATER
- if (src->u.simple.perm) {
- if (NULL==(dst->u.simple.perm=H5FL_ARR_MALLOC(hsize_t,src->u.simple.rank)))
- HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
- HDmemcpy (dst->u.simple.perm, src->u.simple.perm, src->u.simple.rank*sizeof(src->u.simple.perm[0]));
- }
-#endif
+ /* Copy extent information */
+ if(H5S_extent_copy(dst,src)<0)
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy extent");
/* Set return value */
ret_value=dst;
@@ -400,8 +383,8 @@ done:
*
* Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Wednesday, March 31, 2004
+ * Programmer: Robb Matzke
+ * Thursday, April 30, 1998
*
* Modifications:
*
@@ -429,8 +412,8 @@ done:
*
* Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Wednesday, March 31, 2004
+ * Programmer: Quincey Koziol
+ * Thursday, March 30, 2000
*
* Modifications:
*