diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2011-07-21 14:57:40 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2011-07-21 14:57:40 (GMT) |
commit | 400e415d76fb1a64cb15fe013299707f194b34a0 (patch) | |
tree | 7cefd75d68a2829bb515a1ca7b9327089c2f7004 /src/H5SMcache.c | |
parent | a42f3b9ddaca2f2d566f38bebdd419a3c941669a (diff) | |
download | hdf5-400e415d76fb1a64cb15fe013299707f194b34a0.zip hdf5-400e415d76fb1a64cb15fe013299707f194b34a0.tar.gz hdf5-400e415d76fb1a64cb15fe013299707f194b34a0.tar.bz2 |
[svn-r21136] Description:
Bring r21135 from trunk to 1.8 branch:
More code cleanups to reduce coupling with the H5F package.
Tested on:
FreeBSD/32 8.2 (loyalty) w/gcc4.6, w/C++ & FORTRAN, in debug mode
(h5committested on trunk)
Diffstat (limited to 'src/H5SMcache.c')
-rw-r--r-- | src/H5SMcache.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/H5SMcache.c b/src/H5SMcache.c index ad89c85..1dfbaab 100644 --- a/src/H5SMcache.c +++ b/src/H5SMcache.c @@ -17,7 +17,6 @@ /* Module Setup */ /****************/ -#define H5F_PACKAGE /*suppress error about including H5Fpkg */ #define H5SM_PACKAGE /*suppress error about including H5SMpkg */ @@ -25,7 +24,7 @@ /* Headers */ /***********/ #include "H5Eprivate.h" /* Error handling */ -#include "H5Fpkg.h" /* File access */ +#include "H5Fprivate.h" /* File access */ #include "H5FLprivate.h" /* Free Lists */ #include "H5MFprivate.h" /* File memory management */ #include "H5MMprivate.h" /* Memory management */ @@ -131,16 +130,16 @@ H5SM_table_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void UNUSED *udata) /* Verify that we're reading version 0 of the table; this is the only * version defined so far. */ - HDassert(f->shared->sohm_vers == HDF5_SHAREDHEADER_VERSION); + HDassert(H5F_SOHM_VERS(f) == HDF5_SHAREDHEADER_VERSION); /* Allocate space for the master table in memory */ if(NULL == (table = H5FL_CALLOC(H5SM_master_table_t))) HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "memory allocation failed") /* Read number of indexes and version from file superblock */ - table->num_indexes = f->shared->sohm_nindexes; + table->num_indexes = H5F_SOHM_NINDEXES(f); - HDassert(addr == f->shared->sohm_addr); + HDassert(addr == H5F_SOHM_ADDR(f)); HDassert(addr != HADDR_UNDEF); HDassert(table->num_indexes > 0); @@ -271,7 +270,7 @@ H5SM_table_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5SM_ma /* Verify that we're writing version 0 of the table; this is the only * version defined so far. */ - HDassert(f->shared->sohm_vers == HDF5_SHAREDHEADER_VERSION); + HDassert(H5F_SOHM_VERS(f) == HDF5_SHAREDHEADER_VERSION); /* Wrap the local buffer for serialized header info */ if(NULL == (wb = H5WB_wrap(tbl_buf, sizeof(tbl_buf)))) @@ -613,7 +612,7 @@ H5SM_list_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5SM_lis computed_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0); UINT32ENCODE(p, computed_chksum); #ifdef H5_CLEAR_MEMORY -HDmemset(p, 0, (list->header->list_size - (p - buf))); +HDmemset(p, 0, (list->header->list_size - (size_t)(p - buf))); #endif /* H5_CLEAR_MEMORY */ /* Write the list to disk */ |