aboutsummaryrefslogtreecommitdiff
path: root/include/ctemplates.h
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2019-09-27 21:41:40 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2019-09-27 22:27:13 -0400
commitd9103bafe57bb68439cfccef106a7334051bf876 (patch)
treeea25e253b1e867f28378cb9c295ae355db9c17c7 /include/ctemplates.h
parentd1a1990c4177653fd2379c227142e6208ecfc20d (diff)
downloadlibctemplates-d9103bafe57bb68439cfccef106a7334051bf876.tar.gz
libctemplates-d9103bafe57bb68439cfccef106a7334051bf876.tar.bz2
libctemplates-d9103bafe57bb68439cfccef106a7334051bf876.zip
Squashed warnings
Added the -Wextra flag to the makefile for debug builds, and squashed all the warning that came up.
Diffstat (limited to 'include/ctemplates.h')
-rw-r--r--include/ctemplates.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/ctemplates.h b/include/ctemplates.h
index 7c8e57c..e0598ad 100644
--- a/include/ctemplates.h
+++ b/include/ctemplates.h
@@ -45,8 +45,8 @@ struct TMPL_varlist* TMPL_alloc_varlist(void);
/* Frees a varlist (and recursively, any loops under it, any varlists under those loops, ect.) */
void TMPL_free_varlist(struct TMPL_varlist* t);
-/* Allocate a new template. If allocation fails, the struct retunred will be NULL */
-struct TMPL_templates* TMPL_alloc_template(const char* t);
+/* Allocate a new template. If allocation fails, the retunred value will be non-zero*/
+int TMPL_alloc_template(const char* tmplstr, struct TMPL_templates **t);
/* Free a template. Do not use the string returned by TMPL_render() the template is freed */
void TMPL_free_template(struct TMPL_templates* t);
@@ -61,6 +61,7 @@ If size_p is non-null, the size of the resulting string will be placed in it.
If any errors happened the t->error will be non-zero and the error can be
retreived with TMPL_err(t,&size)*/
char* TMPL_render(struct TMPL_templates* t, struct TMPL_varlist* varlist, size_t* size_p);
+/*Returns a string error that might give more information*/
const char* TMPL_err(struct TMPL_templates* t,size_t* size);
/* A debug functions */