summaryrefslogtreecommitdiff
path: root/src/mint/taler-mint-httpd_parsing.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-07-11 21:45:34 +0200
committerChristian Grothoff <christian@grothoff.org>2015-07-11 21:45:34 +0200
commita74f55754aaeb3e28cb6943b1dd50e4a4117070b (patch)
treeef529d63d37ad3bd41923d5afb003052b9f7974f /src/mint/taler-mint-httpd_parsing.h
parentee7e690bff1e85b7ac1af66f984fa84588c4c6cc (diff)
downloadexchange-a74f55754aaeb3e28cb6943b1dd50e4a4117070b.tar.gz
exchange-a74f55754aaeb3e28cb6943b1dd50e4a4117070b.tar.bz2
exchange-a74f55754aaeb3e28cb6943b1dd50e4a4117070b.zip
fixing #3876 (no semantic change, just stylistic changes)
Diffstat (limited to 'src/mint/taler-mint-httpd_parsing.h')
-rw-r--r--src/mint/taler-mint-httpd_parsing.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/mint/taler-mint-httpd_parsing.h b/src/mint/taler-mint-httpd_parsing.h
index 2e036f322..a2cf4c469 100644
--- a/src/mint/taler-mint-httpd_parsing.h
+++ b/src/mint/taler-mint-httpd_parsing.h
@@ -194,7 +194,7 @@ struct TMH_PARSE_FieldSpecification
* value that was stored in @e destination (useful for
* variable-size allocations).
*/
- size_t destination_size_out;
+ size_t *destination_size_out;
/**
* Navigation command to use to extract the value. Note that
@@ -250,14 +250,21 @@ TMH_PARSE_release_data (struct TMH_PARSE_FieldSpecification *spec);
* @param field name of the field
* @param value where to store the value
*/
-#define TMH_PARSE_MEMBER_FIXED(field,value) { field, value, sizeof (*value), 0, TMH_PARSE_JNC_RET_DATA, 0 }
+#define TMH_PARSE_member_fixed(field,value) { field, value, sizeof (*value), NULL, TMH_PARSE_JNC_RET_DATA, 0 }
+
/**
* Generate line in parser specification for variable-size value.
*
* @param field name of the field
+ * @param[out] ptr pointer to initialize
+ * @param[out] ptr_size size to initialize
+ * @return corresponding field spec
*/
-#define TMH_PARSE_MEMBER_VARIABLE(field) { field, NULL, 0, 0, TMH_PARSE_JNC_RET_DATA_VAR, 0 }
+struct TMH_PARSE_FieldSpecification
+TMH_PARSE_member_variable (const char *field,
+ void **ptr,
+ size_t *ptr_size);
/**
@@ -349,7 +356,7 @@ TMH_PARSE_member_time_abs (const char *field,
/**
* Generate line in parser specification indicating the end of the spec.
*/
-#define TMH_PARSE_MEMBER_END { NULL, NULL, 0, 0, TMH_PARSE_JNC_FIELD, 0 }
+#define TMH_PARSE_MEMBER_END { NULL, NULL, 0, NULL, TMH_PARSE_JNC_FIELD, 0 }
/**