From f10d6c459c3a7b4355365882b4b2c64b0235d9f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind?= Date: Fri, 18 Feb 2022 17:01:37 +0100 Subject: [PATCH] Added return value for the node_init - Can be used as before, but cleaner interface in parser.y --- exercises/02/vslc/include/ir.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exercises/02/vslc/include/ir.h b/exercises/02/vslc/include/ir.h index fe2fbf4..863c7dc 100644 --- a/exercises/02/vslc/include/ir.h +++ b/exercises/02/vslc/include/ir.h @@ -16,8 +16,10 @@ typedef struct n { * @param *data associated data. Declared void to allow any type * @param n_children number of children * @param ... variable argument list of child nodes (node_t *) + * + * @return Pointer to the initialized node * */ -void node_init ( +node_t* node_init ( node_t *nd, node_index_t type, void *data, uint64_t n_children, ... ); #endif