From 74dfcce06d39060a4a97c1dd06db9eb55cdbf001 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sun, 15 Nov 2015 22:13:30 -0200 Subject: directives: content-parser: added blogc_directive_ctx_t --- src/content-parser.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/content-parser.c') diff --git a/src/content-parser.c b/src/content-parser.c index 8bdd861..8e98405 100644 --- a/src/content-parser.c +++ b/src/content-parser.c @@ -1118,8 +1118,14 @@ param_end: if (c == '\n' || c == '\r' || is_last) { // FIXME: handle errors in the rest of the parser. blogc_error_t *err = NULL; - char *rv_d = blogc_directive_loader(directive_name, - directive_argument, directive_params, &err); + blogc_directive_ctx_t *ctx = b_malloc( + sizeof(blogc_directive_ctx_t)); + ctx->name = directive_name; + ctx->argument = directive_argument; + ctx->params = directive_params; + ctx->eol = line_ending; + char *rv_d = blogc_directive_loader(ctx, &err); + free(ctx); blogc_error_print(err); if (rv_d != NULL) b_string_append(rv, rv_d); -- cgit v1.2.3-18-g5258