Attempt to make the ODBC driver thread-safe

I'm not sure if this is a complete solution - some of the global state
has been moved to thread-local storage. So passing an ODBC handle across
threads may have unexpected results. But at least it's not global state.

Each ODBC handle now has its own iconv_t object.

See #23
This commit is contained in:
Evan Miller
2020-08-19 15:35:02 -04:00
parent 1ad0dd2d8b
commit 9020ca9a1e
5 changed files with 29 additions and 47 deletions

View File

@@ -121,7 +121,7 @@ typedef struct GOptionContext {
/* string functions */
void *g_memdup(const void *src, size_t len);
int g_str_equal(const void *str1, const void *str2);
char **g_strsplit(const char *haystack, const char *needle, int something);
char **g_strsplit(const char *haystack, const char *needle, int max_tokens);
void g_strfreev(char **dir);
char *g_strconcat(const char *first, ...);
char *g_strdup(const char *src);