summaryrefslogtreecommitdiff
path: root/test.c
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-08-27 14:39:23 -0400
committerPaul Duncan <pabs@pablotron.org>2016-08-27 14:39:23 -0400
commit19653e153b70e72e9a75e74655c8e56025ce4d61 (patch)
tree93d0b8e740ca1ef6f9883353e1d47754e1196f5c /test.c
parent145175a2aa42e02b3d01b012aca6bbc46abc1106 (diff)
downloadlibfhp-19653e153b70e72e9a75e74655c8e56025ce4d61.tar.bz2
libfhp-19653e153b70e72e9a75e74655c8e56025ce4d61.zip
hash http method and version and add tokens for fast parsing
Diffstat (limited to 'test.c')
-rw-r--r--test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test.c b/test.c
index 792316d..fc209b9 100644
--- a/test.c
+++ b/test.c
@@ -64,7 +64,7 @@ test_basic(void) {
fhp_t fhp;
// init parser
- if ((err = fhp_init(&fhp, basic_cb, NULL)) != FHP_OK) {
+ if ((err = fhp_init(&fhp, NULL, basic_cb, NULL)) != FHP_OK) {
die("test_basic", "fhp_init", err);
}
@@ -98,7 +98,7 @@ percent_cb(
uint8_t * const buf,
size_t len
) {
- percent_data *data = fhp_user_data(fhp);
+ percent_data *data = fhp_get_user_data(fhp);
switch (token) {
case FHP_TOKEN_URL_START:
@@ -134,7 +134,7 @@ test_percent(void) {
percent_data data;
// init parser
- if ((err = fhp_init(&fhp, percent_cb, &data)) != FHP_OK) {
+ if ((err = fhp_init(&fhp, NULL, percent_cb, &data)) != FHP_OK) {
die("test_percent", "fhp_init", err);
}