Changeset 430 for trunk/data
- Timestamp:
- 08/18/08 18:35:13 (3 months ago)
- Files:
-
- 1 modified
-
trunk/data/sqlite3/tempdir.diff (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/data/sqlite3/tempdir.diff
r413 r430 37 37 "/usr/tmp", 38 38 "/tmp", 39 @@ -2509,6 +2514,1 1@@39 @@ -2509,6 +2514,12 @@ 40 40 int i, j; 41 41 struct stat buf; 42 42 const char *zDir = "."; 43 43 +#ifdef __APPLE__ 44 + void *pool; 44 45 + CFStringRef cfstr; 45 46 + CFIndex maxsize; … … 55 56 +#ifdef __APPLE__ 56 57 + if (azDirs[1] == NULL) { 57 + NSPushAutoreleasePool();58 + pool = NSPushAutoreleasePool(0); 58 59 + cfstr = (CFStringRef) NSTemporaryDirectory(); 59 60 + maxsize = CFStringGetMaximumSizeForEncoding(CFStringGetLength(cfstr), kCFStringEncodingUTF8) + 1; … … 61 62 + CFStringGetCString(cfstr, cstr, maxsize, kCFStringEncodingUTF8); 62 63 + azDirs[1] = cstr; 63 + NSPopAutoreleasePool( );64 + NSPopAutoreleasePool(pool); 64 65 + } 65 66 +#endif
