aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_pq_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_pq_lib.h')
-rw-r--r--src/include/gnunet_pq_lib.h82
1 files changed, 41 insertions, 41 deletions
diff --git a/src/include/gnunet_pq_lib.h b/src/include/gnunet_pq_lib.h
index 5fde78c24..15af66b5d 100644
--- a/src/include/gnunet_pq_lib.h
+++ b/src/include/gnunet_pq_lib.h
@@ -132,13 +132,13 @@ GNUNET_PQ_cleanup_query_params_closures (
132 * End of query parameter specification. 132 * End of query parameter specification.
133 */ 133 */
134#define GNUNET_PQ_query_param_end \ 134#define GNUNET_PQ_query_param_end \
135 { \ 135 { \
136 .conv = NULL, \ 136 .conv = NULL, \
137 .conv_cls = NULL, \ 137 .conv_cls = NULL, \
138 .data = NULL, \ 138 .data = NULL, \
139 .size = 0, \ 139 .size = 0, \
140 .num_params = 0 \ 140 .num_params = 0 \
141 } 141 }
142 142
143 143
144/** 144/**
@@ -317,10 +317,10 @@ GNUNET_PQ_query_param_array_bytes_same_size (
317 * @return query parameter to use 317 * @return query parameter to use
318 */ 318 */
319#define GNUNET_PQ_query_param_array_auto_from_type(num, elements, db) \ 319#define GNUNET_PQ_query_param_array_auto_from_type(num, elements, db) \
320 GNUNET_PQ_query_param_array_bytes_same_size ((num), \ 320 GNUNET_PQ_query_param_array_bytes_same_size ((num), \
321 (elements), \ 321 (elements), \
322 sizeof(*(elements)), \ 322 sizeof(*(elements)), \
323 (db)) 323 (db))
324 324
325/** 325/**
326 * Generate query parameter for an array of pointers to buffers @a elements, 326 * Generate query parameter for an array of pointers to buffers @a elements,
@@ -350,10 +350,10 @@ GNUNET_PQ_query_param_array_ptrs_bytes_same_size (
350 * @return query parameter to use 350 * @return query parameter to use
351 */ 351 */
352#define GNUNET_PQ_query_param_array_ptrs_auto_from_type(num, elements, db) \ 352#define GNUNET_PQ_query_param_array_ptrs_auto_from_type(num, elements, db) \
353 GNUNET_PQ_query_param_array_ptrs_bytes_same_size ((num), \ 353 GNUNET_PQ_query_param_array_ptrs_bytes_same_size ((num), \
354 (elements), \ 354 (const void **) (elements), \
355 sizeof(*(elements[0])), \ 355 sizeof(*(elements[0])), \
356 (db)) 356 (db))
357 357
358 358
359/** 359/**
@@ -382,7 +382,7 @@ GNUNET_PQ_query_param_array_string (
382struct GNUNET_PQ_QueryParam 382struct GNUNET_PQ_QueryParam
383GNUNET_PQ_query_param_array_ptrs_string ( 383GNUNET_PQ_query_param_array_ptrs_string (
384 unsigned int num, 384 unsigned int num,
385 const char *elements[], 385 const char *elements[static num],
386 struct GNUNET_PQ_Context *db); 386 struct GNUNET_PQ_Context *db);
387 387
388 388
@@ -394,7 +394,7 @@ GNUNET_PQ_query_param_array_ptrs_string (
394 * @return query parameter to use 394 * @return query parameter to use
395 */ 395 */
396#define GNUNET_PQ_query_param_auto_from_type(x) \ 396#define GNUNET_PQ_query_param_auto_from_type(x) \
397 GNUNET_PQ_query_param_fixed_size ((x), sizeof(*(x))) 397 GNUNET_PQ_query_param_fixed_size ((x), sizeof(*(x)))
398 398
399/** 399/**
400 * Generate query parameter for an array of absolute time stamps (continuous) 400 * Generate query parameter for an array of absolute time stamps (continuous)
@@ -685,17 +685,17 @@ struct GNUNET_PQ_ResultSpec
685 * @return array last entry for the result specification to use 685 * @return array last entry for the result specification to use
686 */ 686 */
687#define GNUNET_PQ_result_spec_end \ 687#define GNUNET_PQ_result_spec_end \
688 { \ 688 { \
689 .conv = NULL, \ 689 .conv = NULL, \
690 .cleaner = NULL, \ 690 .cleaner = NULL, \
691 .cls = NULL, \ 691 .cls = NULL, \
692 .dst = NULL, \ 692 .dst = NULL, \
693 .dst_size = 0, \ 693 .dst_size = 0, \
694 .fname = NULL, \ 694 .fname = NULL, \
695 .result_size = NULL, \ 695 .result_size = NULL, \
696 .is_nullable = false, \ 696 .is_nullable = false, \
697 .is_null = NULL \ 697 .is_null = NULL \
698 } 698 }
699 699
700 700
701/** 701/**
@@ -748,7 +748,7 @@ GNUNET_PQ_result_spec_fixed_size (const char *name,
748 * @return array entry for the result specification to use 748 * @return array entry for the result specification to use
749 */ 749 */
750#define GNUNET_PQ_result_spec_auto_from_type(name, dst) \ 750#define GNUNET_PQ_result_spec_auto_from_type(name, dst) \
751 GNUNET_PQ_result_spec_fixed_size (name, (dst), sizeof(*(dst))) 751 GNUNET_PQ_result_spec_fixed_size (name, (dst), sizeof(*(dst)))
752 752
753 753
754/** 754/**
@@ -1056,12 +1056,12 @@ GNUNET_PQ_result_spec_array_fixed_size (
1056 * @return array entry for the result specification to use 1056 * @return array entry for the result specification to use
1057 */ 1057 */
1058#define GNUNET_PQ_result_spec_auto_array_from_type(db, name, num, dst) \ 1058#define GNUNET_PQ_result_spec_auto_array_from_type(db, name, num, dst) \
1059 GNUNET_PQ_result_spec_array_fixed_size ( \ 1059 GNUNET_PQ_result_spec_array_fixed_size ( \
1060 (db), \ 1060 (db), \
1061 (name), \ 1061 (name), \
1062 sizeof(*(dst)), \ 1062 sizeof(*(dst)), \
1063 (num), \ 1063 (num), \
1064 (void *) &(dst)) 1064 (void *) &(dst))
1065 1065
1066 1066
1067/** 1067/**
@@ -1253,9 +1253,9 @@ struct GNUNET_PQ_PreparedStatement
1253 * Terminator for prepared statement list. 1253 * Terminator for prepared statement list.
1254 */ 1254 */
1255#define GNUNET_PQ_PREPARED_STATEMENT_END \ 1255#define GNUNET_PQ_PREPARED_STATEMENT_END \
1256 { \ 1256 { \
1257 NULL, NULL \ 1257 NULL, NULL \
1258 } 1258 }
1259 1259
1260 1260
1261/** 1261/**
@@ -1325,9 +1325,9 @@ struct GNUNET_PQ_ExecuteStatement
1325 * Terminator for executable statement list. 1325 * Terminator for executable statement list.
1326 */ 1326 */
1327#define GNUNET_PQ_EXECUTE_STATEMENT_END \ 1327#define GNUNET_PQ_EXECUTE_STATEMENT_END \
1328 { \ 1328 { \
1329 NULL, GNUNET_SYSERR \ 1329 NULL, GNUNET_SYSERR \
1330 } 1330 }
1331 1331
1332 1332
1333/** 1333/**