mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-18 17:40:55 +08:00
[svn-r14209] Description:
Remove 1.6 compatibility ifdef's which were masking error from querying for info on invalid filter. Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode
This commit is contained in:
parent
b0eb42058c
commit
873c1d3181
29
src/H5Z.c
29
src/H5Z.c
@ -1252,42 +1252,33 @@ done:
|
||||
* Programmer: James Laird and Nat Furrer
|
||||
* Monday, June 7, 2004
|
||||
*
|
||||
* Modifications:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t H5Zget_filter_info(H5Z_filter_t filter, unsigned int *filter_config_flags)
|
||||
herr_t
|
||||
H5Zget_filter_info(H5Z_filter_t filter, unsigned int *filter_config_flags)
|
||||
{
|
||||
herr_t ret_value=SUCCEED;
|
||||
H5Z_class_t * fclass;
|
||||
H5Z_class_t *fclass;
|
||||
herr_t ret_value = SUCCEED;
|
||||
|
||||
FUNC_ENTER_API(H5Zget_filter_info, FAIL)
|
||||
|
||||
fclass = H5Z_find(filter);
|
||||
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
if(fclass == NULL && filter_config_flags != NULL) {
|
||||
*filter_config_flags = 0;
|
||||
HGOTO_DONE(SUCCEED)
|
||||
} /* end if */
|
||||
#else
|
||||
if(fclass == NULL)
|
||||
/* Look up the filter class info */
|
||||
if(NULL == (fclass = H5Z_find(filter)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Filter not defined")
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
|
||||
if(filter_config_flags != NULL)
|
||||
{
|
||||
/* Set the filter config flags for the application */
|
||||
if(filter_config_flags != NULL) {
|
||||
*filter_config_flags = 0;
|
||||
|
||||
if(fclass->encoder_present)
|
||||
*filter_config_flags |= H5Z_FILTER_CONFIG_ENCODE_ENABLED;
|
||||
if(fclass->decoder_present)
|
||||
*filter_config_flags |= H5Z_FILTER_CONFIG_DECODE_ENABLED;
|
||||
}
|
||||
} /* end if */
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_API(ret_value)
|
||||
}
|
||||
} /* end H5Zget_filter_info() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
|
@ -1822,15 +1822,10 @@ test_get_filter_info(void)
|
||||
|
||||
/* Verify that get_filter_info throws an error when given a bad filter */
|
||||
/* (Depends on 1.6 compatibility flag) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
if(H5Zget_filter_info(-1, &flags) < 0) TEST_ERROR
|
||||
if(flags != 0) TEST_ERROR
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
H5E_BEGIN_TRY {
|
||||
err = H5Zget_filter_info(-1, &flags);
|
||||
} H5E_END_TRY;
|
||||
if(err >= 0) TEST_ERROR
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
|
||||
PASSED();
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user