Permalink
Browse files

dFunctionBegin: hide when not PETSC_USE_DEBUG

  • Loading branch information...
jedbrown committed Mar 16, 2013
1 parent 944e5cb commit 005e3590459851ca3b4977c1fcdfd83b97f08309
Showing with 5 additions and 1 deletion.
  1. +5 −1 include/dohp.h
View
@@ -189,8 +189,9 @@ static inline void *dNextAlignedAddr(size_t alignment,void *ptr)
# define dFree7(a,b,c,d,e,f,g) dFree(a)
#endif
+#if defined(PETSC_USE_DEBUG)
/* This is like PetscFunctionBegin, but does not check __FUNCT__ because we have C99 */
-#define dFunctionBegin \
+# define dFunctionBegin \
do { \
PetscStack* petscstackp; \
petscstackp = (PetscStack*)PetscThreadLocalGetValue(petscstack); \
@@ -203,6 +204,9 @@ static inline void *dNextAlignedAddr(size_t alignment,void *ptr)
petscstackp->currentsize++; \
} \
} while (0)
+#else
+# define dFunctionBegin do {} while(0)
+#endif
#define dFunctionReturn(a) PetscFunctionReturn(a)

0 comments on commit 005e359

Please sign in to comment.