summaryrefslogtreecommitdiffstats
path: root/src/H5R.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-07-31 15:27:07 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-07-31 15:27:07 (GMT)
commit17275779d07c094741039d0c263fdf055c32bfb6 (patch)
treeb8c90295b95498184125853f93fbb8717e2c5e8e /src/H5R.c
parent79b2b5a3213eb3dd950b5ad4d806f828e7fedb88 (diff)
downloadhdf5-17275779d07c094741039d0c263fdf055c32bfb6.zip
hdf5-17275779d07c094741039d0c263fdf055c32bfb6.tar.gz
hdf5-17275779d07c094741039d0c263fdf055c32bfb6.tar.bz2
[svn-r5839] Purpose:
Code cleanup Description: Move operations on each type of selection into the source code file for each selection type (all->H5Sall.c, hyperslab->H5Shyper.c, etc.) Remove central H5S_select_<foo> operations, instead calling the operations through function pointers in each selection (a much more object-oriented approach). Platforms tested: FreeBSD 4.6 (sleipnir)
Diffstat (limited to 'src/H5R.c')
-rw-r--r--src/H5R.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/H5R.c b/src/H5R.c
index 6a2384c..722496e 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -13,6 +13,7 @@
/* $Id$ */
#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+#define H5S_PACKAGE /*suppress error about including H5Spkg */
#include "H5private.h" /* Generic Functions */
#include "H5Iprivate.h" /* ID Functions */
@@ -23,7 +24,7 @@
#include "H5HGprivate.h" /* Global Heaps */
#include "H5MMprivate.h" /* Memory Management */
#include "H5Rprivate.h" /* References */
-#include "H5Sprivate.h" /* Dataspaces */
+#include "H5Spkg.h" /* Dataspaces */
#include "H5Tprivate.h" /* Datatypes */
/* Interface initialization */
@@ -194,7 +195,7 @@ H5R_create(void *_ref, H5G_entry_t *loc, const char *name, H5R_type_t ref_type,
HDmemset(ref->heapid,H5R_DSET_REG_REF_BUF_SIZE,0);
/* Get the amount of space required to serialize the selection */
- if ((buf_size = H5S_select_serial_size(space)) < 0)
+ if ((buf_size = (*space->select.serial_size)(space)) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL,
"Invalid amount of space for serializing selection");
@@ -212,7 +213,7 @@ H5R_create(void *_ref, H5G_entry_t *loc, const char *name, H5R_type_t ref_type,
H5F_addr_encode(loc->file,&p,addr);
/* Serialize the selection */
- if (H5S_select_serialize(space,p) < 0)
+ if ((*space->select.serialize)(space,p) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Unable to serialize selection");
/* Save the serialized buffer for later */