summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-04-28 14:41:07 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-04-28 14:41:07 (GMT)
commit8ae072d76010005276fabf71233fb299fb1bace6 (patch)
tree632206e8fcbaa809cde3ac89866fcfee91d7e410 /src/H5private.h
parent808390dbd9b0ec8beed817121fdf0fd0aa25ff0a (diff)
downloadhdf5-8ae072d76010005276fabf71233fb299fb1bace6.zip
hdf5-8ae072d76010005276fabf71233fb299fb1bace6.tar.gz
hdf5-8ae072d76010005276fabf71233fb299fb1bace6.tar.bz2
[svn-r16869] Description:
Reduce overhead for func enter/leave & error handling macros. (Reduces object code size by ~20% for production/~10% for debug, with gcc) Tested on: Mac OS X/32 10.5.6 (amazon) (Too minor to require h5committest)
Diffstat (limited to 'src/H5private.h')
-rw-r--r--src/H5private.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/H5private.h b/src/H5private.h
index 7a7ec53..43b8a95 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1741,6 +1741,7 @@ static herr_t H5_INTERFACE_INIT_FUNC(void);
#define FUNC_ENTER_COMMON(func_name,asrt) \
static const char FUNC[]=#func_name; \
+ hbool_t err_occurred = FALSE; \
FUNC_ENTER_COMMON_NOFUNC(func_name,asrt);
/* Threadsafety initialization code for API routines */
@@ -1910,7 +1911,9 @@ static herr_t H5_INTERFACE_INIT_FUNC(void);
#define FUNC_LEAVE_API(ret_value) \
FINISH_MPE_LOG; \
H5TRACE_RETURN(ret_value); \
- H5_POP_FUNC \
+ H5_POP_FUNC \
+ if(err_occurred) \
+ (void)H5E_dump_api_stack(TRUE); \
FUNC_LEAVE_API_THREADSAFE \
return (ret_value); \
} /*end scope from end of FUNC_ENTER*/ \
@@ -1919,6 +1922,8 @@ static herr_t H5_INTERFACE_INIT_FUNC(void);
#define FUNC_LEAVE_API_NOFS(ret_value) \
FINISH_MPE_LOG; \
H5TRACE_RETURN(ret_value); \
+ if(err_occurred) \
+ (void)H5E_dump_api_stack(TRUE); \
FUNC_LEAVE_API_THREADSAFE \
return (ret_value); \
} /*end scope from end of FUNC_ENTER*/ \