From 1dc78385590fc3b201a4cde1c417b18c0ccf2f7c Mon Sep 17 00:00:00 2001 From: Jay Freeman Date: Mon, 18 Aug 2008 18:35:13 +0000 Subject: Added support for seatbelt'd temporary folders. git-svn-id: http://svn.telesphoreo.org/trunk@430 514c082c-b64e-11dc-b46d-3d985efe055d --- data/sqlite3/tempdir.diff | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'data/sqlite3') 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 + -- cgit v1.2.3