diff options
Diffstat (limited to 'src/H5Oshared.c')
-rw-r--r-- | src/H5Oshared.c | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/src/H5Oshared.c b/src/H5Oshared.c index f4d062a..92d959b 100644 --- a/src/H5Oshared.c +++ b/src/H5Oshared.c @@ -28,6 +28,10 @@ #define H5F_PACKAGE /*suppress error about including H5Fpkg */ #define H5O_PACKAGE /*suppress error about including H5Opkg */ +/* Pablo information */ +/* (Put before include files to avoid problems with inline functions) */ +#define PABLO_MASK H5O_shared_mask + #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fpkg.h" /* File access */ @@ -37,7 +41,7 @@ static void *H5O_shared_decode (H5F_t*, hid_t dxpl_id, const uint8_t*, H5O_shared_t *sh); static herr_t H5O_shared_encode (H5F_t*, uint8_t*, const void*); -static void *H5O_shared_copy(const void *_mesg, void *_dest); +static void *H5O_shared_copy(const void *_mesg, void *_dest, unsigned update_flags); static size_t H5O_shared_size (H5F_t*, const void *_mesg); static herr_t H5O_shared_delete(H5F_t *f, hid_t dxpl_id, const void *_mesg); static herr_t H5O_shared_link(H5F_t *f, hid_t dxpl_id, const void *_mesg); @@ -68,8 +72,6 @@ const H5O_class_t H5O_SHARED[1] = {{ #define H5O_SHARED_VERSION 2 /* Interface initialization */ -#define PABLO_MASK H5O_shared_mask -static int interface_initialize_g = 0; #define INTERFACE_INIT NULL @@ -99,7 +101,7 @@ H5O_shared_read(H5F_t *f, hid_t dxpl_id, H5O_shared_t *shared, const H5O_class_t { void *ret_value = NULL; /* Return value */ - FUNC_ENTER_NOAPI(H5O_shared_read,NULL); + FUNC_ENTER_NOAPI_NOINIT(H5O_shared_read); /* check args */ assert(f); @@ -158,7 +160,7 @@ H5O_shared_link_adj(H5F_t *f, hid_t dxpl_id, const H5O_shared_t *shared, int adj { int ret_value; /* Return value */ - FUNC_ENTER_NOAPI(H5O_shared_link_adj,FAIL); + FUNC_ENTER_NOAPI_NOINIT(H5O_shared_link_adj); /* check args */ assert(f); @@ -214,7 +216,7 @@ H5O_shared_decode (H5F_t *f, hid_t UNUSED dxpl_id, const uint8_t *buf, H5O_share unsigned flags, version; void *ret_value; /* Return value */ - FUNC_ENTER_NOAPI(H5O_shared_decode, NULL); + FUNC_ENTER_NOAPI_NOINIT(H5O_shared_decode); /* Check args */ assert (f); @@ -230,7 +232,7 @@ H5O_shared_decode (H5F_t *f, hid_t UNUSED dxpl_id, const uint8_t *buf, H5O_share if (version!=H5O_SHARED_VERSION_1 && version!=H5O_SHARED_VERSION) HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for shared object message"); - /* Flags */ + /* Get the shared information flags */ flags = *buf++; mesg->in_gh = (flags & 0x01); @@ -287,9 +289,8 @@ H5O_shared_encode (H5F_t *f, uint8_t *buf/*out*/, const void *_mesg) { const H5O_shared_t *mesg = (const H5O_shared_t *)_mesg; unsigned flags; - herr_t ret_value=SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(H5O_shared_encode, FAIL); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_shared_encode); /* Check args */ assert (f); @@ -323,8 +324,7 @@ H5O_shared_encode (H5F_t *f, uint8_t *buf/*out*/, const void *_mesg) H5F_addr_encode (f, &buf, mesg->u.ent.header); #endif /* OLD_WAY */ -done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(SUCCEED); } @@ -347,13 +347,13 @@ done: *------------------------------------------------------------------------- */ static void * -H5O_shared_copy(const void *_mesg, void *_dest) +H5O_shared_copy(const void *_mesg, void *_dest, unsigned UNUSED update_flags) { const H5O_shared_t *mesg = (const H5O_shared_t *) _mesg; H5O_shared_t *dest = (H5O_shared_t *) _dest; void *ret_value; /* Return value */ - FUNC_ENTER_NOAPI(H5O_shared_copy, NULL); + FUNC_ENTER_NOAPI_NOINIT(H5O_shared_copy); /* check args */ assert(mesg); @@ -393,7 +393,7 @@ H5O_shared_size (H5F_t *f, const void *_mesg) const H5O_shared_t *shared = (const H5O_shared_t *) _mesg; size_t ret_value; - FUNC_ENTER_NOAPI(H5O_shared_size, 0); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_shared_size); ret_value = 1 + /*version */ 1 + /*the flags field */ @@ -401,7 +401,6 @@ H5O_shared_size (H5F_t *f, const void *_mesg) (H5F_SIZEOF_ADDR(f)+4) : /*sharing via global heap */ H5F_SIZEOF_ADDR(f)); /*sharing by another obj hdr */ -done: FUNC_LEAVE_NOAPI(ret_value); } @@ -426,7 +425,7 @@ H5O_shared_delete(H5F_t *f, hid_t dxpl_id, const void *_mesg) const H5O_shared_t *shared = (const H5O_shared_t *) _mesg; herr_t ret_value=SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(H5O_shared_delete, FAIL); + FUNC_ENTER_NOAPI_NOINIT(H5O_shared_delete); /* check args */ assert(f); @@ -462,7 +461,7 @@ H5O_shared_link(H5F_t *f, hid_t dxpl_id, const void *_mesg) const H5O_shared_t *shared = (const H5O_shared_t *) _mesg; herr_t ret_value=SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(H5O_shared_link, FAIL); + FUNC_ENTER_NOAPI_NOINIT(H5O_shared_link); /* check args */ assert(f); @@ -496,9 +495,8 @@ H5O_shared_debug (H5F_t UNUSED *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent, int fwidth) { const H5O_shared_t *mesg = (const H5O_shared_t *)_mesg; - herr_t ret_value=SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(H5O_shared_debug, FAIL); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_shared_debug); /* Check args */ assert (f); @@ -525,6 +523,5 @@ H5O_shared_debug (H5F_t UNUSED *f, hid_t dxpl_id, const void *_mesg, HADDR_UNDEF); } -done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(SUCCEED); } |