From 19653e153b70e72e9a75e74655c8e56025ce4d61 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sat, 27 Aug 2016 14:39:23 -0400 Subject: hash http method and version and add tokens for fast parsing --- test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test.c') 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); } -- cgit v1.2.3