summaryrefslogtreecommitdiffstats
path: root/src/H5SM.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-12-19 01:59:28 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-12-19 01:59:28 (GMT)
commit43ec5b7ef4df2d72bcde2da9366d55383b8f40e8 (patch)
tree705125a1b023c990db69abd82ae878eb90800447 /src/H5SM.c
parent5865018c85449e4b03bb3f5d5e7d7948e110fe17 (diff)
downloadhdf5-43ec5b7ef4df2d72bcde2da9366d55383b8f40e8.zip
hdf5-43ec5b7ef4df2d72bcde2da9366d55383b8f40e8.tar.gz
hdf5-43ec5b7ef4df2d72bcde2da9366d55383b8f40e8.tar.bz2
[svn-r13074] Description:
Add support for opening attributes in dense and/or shared storage by index. Move routines for building and operating on tables of attributes into separate source module. Fix bug where reverting from "dense" to "compact" storage would 'unshare' attributes. Minor code cleanups, etc. Tested on: Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5SM.c')
-rwxr-xr-xsrc/H5SM.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/H5SM.c b/src/H5SM.c
index 102bb8b..76914b8 100755
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -1185,3 +1185,33 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5SM_get_info() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5SM_reconstitute
+ *
+ * Purpose: Reconstitute a shared object header message structure from
+ * a plain heap ID.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * Monday, December 18, 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5SM_reconstitute(H5O_shared_t *sh_mesg, const uint8_t *heap_id)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_reconstitute)
+
+ /* Sanity check args */
+ HDassert(sh_mesg);
+ HDassert(heap_id);
+
+ /* Set flag for shared message */
+ sh_mesg->flags = H5O_SHARED_IN_HEAP_FLAG;
+ HDmemcpy(&sh_mesg->u.heap_id, heap_id, H5SM_FHEAP_ID_LEN);
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5SM_reconstitute() */
+