diff options
author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2021-11-05 19:45:02 +0300 |
---|---|---|
committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2021-11-05 19:45:02 +0300 |
commit | 975465c3f5302117eef779672ada76627371c3bf (patch) | |
tree | 25e47f898ff4a2c3177e1979febc269ed4e719fd /src/template.h | |
parent | a986818ad798d50f41d9e1fd569c926a67341b6e (diff) | |
download | unja-975465c3f5302117eef779672ada76627371c3bf.tar.gz unja-975465c3f5302117eef779672ada76627371c3bf.zip |
Hashmap improvements and include guards
Hashmap capacity can be set programmatically and it grows/shrinks in
size when the load increases/decreases to avoid collisions/save memory.
Diffstat (limited to 'src/template.h')
-rw-r--r-- | src/template.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/template.h b/src/template.h index 45a58fc..6defb02 100644 --- a/src/template.h +++ b/src/template.h @@ -1,10 +1,19 @@ +#ifndef UNJA_TEMPLATE_H +#define UNJA_TEMPLATE_H + #include "hashmap.h" #include "vector.h" - struct env; + struct env *env_new(); + void env_free(struct env *env); + char *template(struct env *env, char *template_name, struct hashmap *ctx); + char *template_string(char *tmpl, struct hashmap *ctx); -char *read_file(char *filename);
\ No newline at end of file + +char *read_file(char *filename); + +#endif |