summaryrefslogtreecommitdiff
path: root/data/sqlite3
diff options
context:
space:
mode:
authorJay Freeman <saurik@saurik.com>2008-08-18 18:35:13 +0000
committerJay Freeman <saurik@saurik.com>2008-08-18 18:35:13 +0000
commit1dc78385590fc3b201a4cde1c417b18c0ccf2f7c (patch)
treeb47bcc4a85a337ae8f54504ab661b8cc0c31a4a3 /data/sqlite3
parent1be61d01e0e247ad45e7cde250164ea6d4073ad6 (diff)
Added support for seatbelt'd temporary folders.
git-svn-id: http://svn.telesphoreo.org/trunk@430 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data/sqlite3')
-rw-r--r--data/sqlite3/tempdir.diff7
1 files changed, 4 insertions, 3 deletions
diff --git a/data/sqlite3/tempdir.diff b/data/sqlite3/tempdir.diff
index 839ee7393..fb862fb1a 100644
--- a/data/sqlite3/tempdir.diff
+++ b/data/sqlite3/tempdir.diff
@@ -36,11 +36,12 @@ diff -ru sqlite-3.5.9/src/os_unix.c sqlite-3.5.9+iPhone/src/os_unix.c
"/var/tmp",
"/usr/tmp",
"/tmp",
-@@ -2509,6 +2514,11 @@
+@@ -2509,6 +2514,12 @@
int i, j;
struct stat buf;
const char *zDir = ".";
+#ifdef __APPLE__
++ void *pool;
+ CFStringRef cfstr;
+ CFIndex maxsize;
+ char *cstr;
@@ -54,13 +55,13 @@ diff -ru sqlite-3.5.9/src/os_unix.c sqlite-3.5.9+iPhone/src/os_unix.c
+#ifdef __APPLE__
+ if (azDirs[1] == NULL) {
-+ NSPushAutoreleasePool();
++ pool = NSPushAutoreleasePool(0);
+ cfstr = (CFStringRef) NSTemporaryDirectory();
+ maxsize = CFStringGetMaximumSizeForEncoding(CFStringGetLength(cfstr), kCFStringEncodingUTF8) + 1;
+ cstr = malloc(maxsize);
+ CFStringGetCString(cfstr, cstr, maxsize, kCFStringEncodingUTF8);
+ azDirs[1] = cstr;
-+ NSPopAutoreleasePool();
++ NSPopAutoreleasePool(pool);
+ }
+#endif
+