]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dict-sql: Move struct sql_dict to header
authorAki Tuomi <aki.tuomi@dovecot.fi>
Mon, 16 Jan 2017 13:29:25 +0000 (15:29 +0200)
committerGitLab <gitlab@git.dovecot.net>
Tue, 24 Jan 2017 12:42:38 +0000 (14:42 +0200)
This allows dereferencing it on test programs

src/lib-dict/Makefile.am
src/lib-dict/dict-sql-private.h [new file with mode: 0644]
src/lib-dict/dict-sql.c

index 027f3215781d73597f1591a07f211359749293c9..eeeb9df2cce8406686e8f7fd1a658c5e5b2967bb 100644 (file)
@@ -36,6 +36,9 @@ headers = \
        dict-sql-settings.h \
        dict-transaction-memory.h
 
+noinst_HEADERS = \
+       dict-sql-private.h
+
 pkginc_libdir=$(pkgincludedir)
 pkginc_lib_HEADERS = $(headers)
 
diff --git a/src/lib-dict/dict-sql-private.h b/src/lib-dict/dict-sql-private.h
new file mode 100644 (file)
index 0000000..2891f76
--- /dev/null
@@ -0,0 +1,16 @@
+#ifndef DICT_SQL_PRIVATE_H
+#define DICT_SQL_PRIVATE_H 1
+
+struct sql_dict {
+       struct dict dict;
+
+       pool_t pool;
+       struct sql_db *db;
+       const char *username;
+       const struct dict_sql_settings *set;
+
+       bool has_on_duplicate_key:1;
+       bool has_using_timestamp:1;
+};
+
+#endif
index 87cb082d4791f98d80c24b5ef76f2abef887bb26..9a4e521866ae1f020f77211976bc5758fdd19c16 100644 (file)
@@ -10,6 +10,7 @@
 #include "dict-private.h"
 #include "dict-sql-settings.h"
 #include "dict-sql.h"
+#include "dict-sql-private.h"
 
 #include <unistd.h>
 #include <fcntl.h>
@@ -22,18 +23,6 @@ enum sql_recurse_type {
        SQL_DICT_RECURSE_FULL
 };
 
-struct sql_dict {
-       struct dict dict;
-
-       pool_t pool;
-       struct sql_db *db;
-       const char *username;
-       const struct dict_sql_settings *set;
-
-       bool has_on_duplicate_key:1;
-       bool has_using_timestamp:1;
-};
-
 struct sql_dict_iterate_context {
        struct dict_iterate_context ctx;
        pool_t pool;