face / activerecord forked from aptiva/activerecord

An objective-C implementation of ActiveRecord

This URL has Read+Write access

face (author)
Sun Jan 25 21:27:20 -0800 2009
commit  0c3907741ae1604da48876e74ee1edab891cb914
tree    9501e7a1a5ba980cadd3411ef1cc589db2f37040
parent  f38b07d32022ff80d6cac2d41c61a63d1f8a47ee
activerecord / ActiveRecord_Prefix.pch
100644 25 lines (21 sloc) 1.524 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//
// Prefix header for all source files of the 'ActiveRecord' target in the 'ActiveRecord' project.
//
#ifdef __OBJC__
#import <Foundation/Foundation.h>
 
// Some debug stuff
// Crashesss
#define CrashHerePlease() { *(int *)0 = 123; }
#define ARLog(...) printf("%s(Active Record)[%u] %32.32s: %s\n", [[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"] UTF8String], \
                                                                 getpid(),\
                                                                 [[NSString stringWithFormat:@"%s:%u", [[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__] UTF8String],\
                                                                 [[NSString stringWithFormat:__VA_ARGS__] UTF8String])
/*#define ARLog(...) printf("%s: %s\n", [[NSString stringWithFormat:@"%s:%u", [[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__] UTF8String],\
                                           [[NSString stringWithFormat:__VA_ARGS__] UTF8String])*/
 
#ifdef ENABLE_AR_DEBUG
// We make it a warning because when unit testing it's nice to see the logs in the list view instead of having to scroll through all the compiler output
#define ARDebugLog(...) printf("%s: warning: %s\n", [[NSString stringWithFormat:@"%s:%u", [[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__] UTF8String], [[NSString stringWithFormat:__VA_ARGS__] UTF8String])
#else
# define ARDebugLog(...)
#endif
 
#endif