diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2020-06-12 12:13:12 -0400 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2020-06-12 12:19:55 -0400 |
commit | 845205f12d5aeb0275a59259b5c658104a7d9197 (patch) | |
tree | ed054cc2818ab688c2b015a1ef3960f557fe7acf /Foundation/GTMSQLite.m | |
parent | 39450c586d1f6bce9b57246dbf29a96643a0fe47 (diff) |
userdata structures need to exist for lifetime of hooks.
Apparently earlier compilers took our `const structs` and put them into const
data for us so their lifetime was effectively equivalent to `static`. Some
change/optimization in 11.4.1 has moved to that not being the case. Explicitly
make the data structures `static`.
Diffstat (limited to 'Foundation/GTMSQLite.m')
-rw-r--r-- | Foundation/GTMSQLite.m | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Foundation/GTMSQLite.m b/Foundation/GTMSQLite.m index f5d25ba..46492d1 100644 --- a/Foundation/GTMSQLite.m +++ b/Foundation/GTMSQLite.m @@ -231,7 +231,7 @@ static CFLocaleRef gCurrentLocale = NULL; int rc = SQLITE_OK; // Install our custom functions for improved text handling // UPPER/LOWER - const struct { + static const struct { const char *sqlName; UpperLowerUserArgs userArgs; void *function; @@ -263,7 +263,7 @@ static CFLocaleRef gCurrentLocale = NULL; } // Fixed collation sequences - const struct { + static const struct { const char *sqlName; CollateUserArgs userArgs; void *function; @@ -288,7 +288,7 @@ static CFLocaleRef gCurrentLocale = NULL; } // Install handler for dynamic collation sequences - const struct { + static const struct { const char *sqlName; int numArgs; int textRep; @@ -335,7 +335,7 @@ static CFLocaleRef gCurrentLocale = NULL; } // Start GLOB just non-literal but case-sensitive (same as SQLite defaults) - const struct { + static const struct { const char *sqlName; int textRep; void *function; |