summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-03-02 13:26:44 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2017-03-02 13:26:44 +0100
commitdc0b4855d42b78693d7f89ec347e49278869514f (patch)
treee194c1a93cb3019a98ab8d2305ac05eed70f5c2b
parentba9ab1c5bb62fd849423509b918d494888a87a38 (diff)
Add comments
Change-Id: Icbbdbd4ed51db62c7619c6210842411b8d2e04a4 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/wgtpkg-mustach.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/wgtpkg-mustach.c b/src/wgtpkg-mustach.c
index 6c3311d..cc79505 100644
--- a/src/wgtpkg-mustach.c
+++ b/src/wgtpkg-mustach.c
@@ -279,6 +279,15 @@ static struct mustach_itf itf = {
.leave = leave
};
+/*
+ * Apply the object 'root' to the mustache 'template'.
+ * In case of success, the function returns 0, the pointer
+ * 'result' receives the allocated instanciation and
+ * the pointer 'size' its size. Note that the real size
+ * is one byte more to effectively store the terminating
+ * null.
+ * In case of error, it returns a negative error code.
+ */
int apply_mustach(const char *template, struct json_object *root, char **result, size_t *size)
{
struct expl e;