diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2015-11-15 22:13:30 -0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2015-11-15 22:13:30 -0200 |
commit | 74dfcce06d39060a4a97c1dd06db9eb55cdbf001 (patch) | |
tree | 96356273fa0bb5a6b447f5c2c201acfc65061d0e /src/content-parser.c | |
parent | f31e60aa815cc38f36fee4ea664efbd631329172 (diff) | |
download | blogc-74dfcce06d39060a4a97c1dd06db9eb55cdbf001.tar.gz blogc-74dfcce06d39060a4a97c1dd06db9eb55cdbf001.tar.bz2 blogc-74dfcce06d39060a4a97c1dd06db9eb55cdbf001.zip |
directives: content-parser: added blogc_directive_ctx_t
Diffstat (limited to 'src/content-parser.c')
-rw-r--r-- | src/content-parser.c | 10 |
1 files changed, 8 insertions, 2 deletions
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); |