Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge a few compatibility ifdefs in for people who redefine their log…

…s to something else than NSLog() and for those using SenTestingKit.
  • Loading branch information...
commit 5afa0d797762aa694f92b0efa41ae7d48502ee95 1 parent f27c7fb
Uli Kusterer authored November 08, 2011

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. 6  UKHelperMacros.h
6  UKHelperMacros.h
@@ -36,11 +36,13 @@
36 36
 //	This prefixes the method or function name to the message.
37 37
 //
38 38
 
  39
+#ifndef UKLog
39 40
 #if DEBUG
40 41
 #define	UKLog(args...)			NSLog( @"%s: %@", __PRETTY_FUNCTION__, [NSString stringWithFormat: args])
41 42
 #else
42  
-#define	UKLog(args...)			// stubbed out
  43
+#define	UKLog(args...)			while(0) // stubbed out
43 44
 #endif
  45
+#endif	// UKLog
44 46
 
45 47
 
46 48
 #if __LP64__
@@ -66,11 +68,13 @@
66 68
 
67 69
 #define CREATE_AUTORELEASE_POOL(pool)		NSAutoreleasePool*	(pool) = [[NSAutoreleasePool alloc] init]
68 70
 
  71
+#ifndef ASSIGN	// SenTest declares its own macro
69 72
 #define ASSIGN(targ,newval)					do {\
70 73
 												NSObject* __UKHELPERMACRO_OLDTARG = (NSObject*)(targ);\
71 74
 												(targ) = [(newval) retain];\
72 75
 												[__UKHELPERMACRO_OLDTARG release];\
73 76
 											} while(0)
  77
+#endif // !defined(ASSIGN)
74 78
 #define ASSIGNMUTABLECOPY(targ,newval)		do {\
75 79
 												NSObject* __UKHELPERMACRO_OLDTARG = (NSObject*)(targ);\
76 80
 												(targ) = [(newval) mutableCopy];\

0 notes on commit 5afa0d7

Please sign in to comment.
Something went wrong with that request. Please try again.