summaryrefslogtreecommitdiffstats
path: root/src/H5Eint.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2010-10-11 22:15:54 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2010-10-11 22:15:54 (GMT)
commit233741567405cb6a983399b19ae298fd9211e124 (patch)
treeb66bc71f7fde9dc125718b58978b6eb85b1bbc78 /src/H5Eint.c
parent293e541644a9c5bc98067d8050f70c8e629eea5d (diff)
parent9df4fe0a8787dd2e7a24c0b8fa5624dc00a18676 (diff)
downloadhdf5-233741567405cb6a983399b19ae298fd9211e124.zip
hdf5-233741567405cb6a983399b19ae298fd9211e124.tar.gz
hdf5-233741567405cb6a983399b19ae298fd9211e124.tar.bz2
[svn-r19578] Bug fix for 1707 - H5Eset_auto causes a seg fault when an application uses -DH5_USE_16_API
with the 1.8 library to compile. The cause is from the mismatch of H5Eprint1 and H5Eprint2 set through H5Eset_auto. I changed the structure H5E_auto_t. I added a IS_DEDAULT flag in it. Both H5Eprint1/2 are the default now. If the user sets his/her own printing function. Then a call to H5Eget_auto1/2 will have to match H5Eset_auto1/2. Tested on heiwa, jam, and amani. The property change in configure.in, config, and Makefile.am came from the merge of the 1.8 library change.
Diffstat (limited to 'src/H5Eint.c')
-rw-r--r--src/H5Eint.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/H5Eint.c b/src/H5Eint.c
index 584ba40..f650581 100644
--- a/src/H5Eint.c
+++ b/src/H5Eint.c
@@ -1011,18 +1011,20 @@ H5E_dump_api_stack(hbool_t is_api)
H5E_t *estack = H5E_get_my_stack();
HDassert(estack);
+
+#ifdef H5_NO_DEPRECATED_SYMBOLS
+ if(estack->auto_op.func2)
+ (void)((estack->auto_op.func2)(H5E_DEFAULT, estack->auto_data));
+#else /* H5_NO_DEPRECATED_SYMBOLS */
if(estack->auto_op.vers == 1) {
-#ifndef H5_NO_DEPRECATED_SYMBOLS
- if(estack->auto_op.u.func1)
- (void)((estack->auto_op.u.func1)(estack->auto_data));
-#else /* H5_NO_DEPRECATED_SYMBOLS */
- HDassert(0 && "version 1 error stack dump without deprecated symbols!");
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
+ if(estack->auto_op.func1)
+ (void)((estack->auto_op.func1)(estack->auto_data));
} /* end if */
else {
- if(estack->auto_op.u.func2)
- (void)((estack->auto_op.u.func2)(H5E_DEFAULT, estack->auto_data));
+ if(estack->auto_op.func2)
+ (void)((estack->auto_op.func2)(H5E_DEFAULT, estack->auto_data));
} /* end else */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
} /* end if */
done: