From 681d9231cf2fb1f01ef84c14285195c059d64a16 Mon Sep 17 00:00:00 2001 From: James Laird Date: Mon, 22 Jan 2007 16:03:24 -0500 Subject: [svn-r13166] Fixed bug in H5Ocopy where shared attributes that were deleted during H5Ocopy would become shared NULL messages (oops!). Added a test for this case. Also fixed the #define that caused errors on Windows (and probably other platforms). This may fix the Daily Test error. Tested on Windows, smirom, kagiso, and juniper. --- src/H5Ocopy.c | 4 +++- src/H5Pdcpl.c | 2 +- test/objcopy.c | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c index 8c263f5..f51533b 100644 --- a/src/H5Ocopy.c +++ b/src/H5Ocopy.c @@ -478,8 +478,10 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */, /* If we're preserving deleted messages, set their types to 'NULL' * in the destination. */ - if(cpy_info->preserve_null && deleted[mesgno]) + if(cpy_info->preserve_null && deleted[mesgno]) { mesg_dst->type = H5O_MSG_NULL; + mesg_dst->flags = 0; + } /* Check for shared message to operate on */ /* (Use destination message, in case the message has been removed (i.e diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 898700b..7306fd4 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -76,7 +76,7 @@ #define H5D_CRT_EXT_FILE_LIST_CMP H5P_dcrt_ext_file_list_cmp /* Definitions for data filter pipeline */ #define H5D_CRT_DATA_PIPELINE_SIZE sizeof(H5O_pline_t) -#define H5D_CRT_DATA_PIPELINE_DEF {0, 0, NULL, {0, {{NULL, HADDR_UNDEF, FALSE}}}} +#define H5D_CRT_DATA_PIPELINE_DEF {{0, {{NULL, HADDR_UNDEF, FALSE}}}, 0, 0, NULL} #define H5D_CRT_DATA_PIPELINE_CMP H5P_dcrt_data_pipeline_cmp diff --git a/test/objcopy.c b/test/objcopy.c index 0de4c97..ab01666 100755 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -7180,6 +7180,7 @@ main(void) nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_SHALLOW_HIERARCHY_FLAG, FALSE, "H5Ocopy(): shallow group copy"); nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_EXPAND_REFERENCE_FLAG, FALSE, "H5Ocopy(): expand object reference"); nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_PRESERVE_NULL_FLAG, FALSE, "H5Ocopy(): preserve NULL messages"); + nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_WITHOUT_ATTR_FLAG | H5O_COPY_PRESERVE_NULL_FLAG, TRUE, "H5Ocopy(): preserve NULL messages"); /* TODO: not implemented nerrors += test_copy_option(my_fapl, H5O_COPY_EXPAND_EXT_LINK_FLAG, FALSE, "H5Ocopy: expand external link"); -- cgit v0.12