free_call.add_argument (new CCodeMemberAccess.pointer (new CCodeIdentifier("node"), "data"));
var data_isnull = new CCodeBinaryExpression (CCodeBinaryOperator.EQUALITY, new CCodeMemberAccess.pointer (new CCodeIdentifier("node"), "data"), new CCodeConstant ("NULL"));
- var ccomma_data = new CCodeCommaExpression ();
- ccomma_data.append_expression (new CCodeConditionalExpression (data_isnull, new CCodeConstant ("NULL"), free_call));
- ccode.add_expression (ccomma_data);
+ var ccomma_free = new CCodeCommaExpression ();
+ ccomma_free.append_expression (free_call);
+ ccomma_free.append_expression (new CCodeConstant ("NULL"));
+ ccode.add_expression (new CCodeConditionalExpression (data_isnull, new CCodeConstant ("NULL"), ccomma_free));
ccode.add_return (new CCodeConstant ("FALSE"));
element_free_call.add_argument (new CCodeIdentifier ("free_func"));
var free_func_isnull = new CCodeBinaryExpression (CCodeBinaryOperator.EQUALITY, new CCodeIdentifier ("free_func"), new CCodeConstant ("NULL"));
- var ccomma = new CCodeCommaExpression ();
- ccomma.append_expression (new CCodeConditionalExpression (free_func_isnull, new CCodeConstant ("NULL"), element_free_call));
-
- ccode.add_expression (ccomma);
+ var ccomma_element_free = new CCodeCommaExpression ();
+ ccomma_element_free.append_expression (element_free_call);
+ ccomma_element_free.append_expression (new CCodeConstant ("NULL"));
+ ccode.add_expression (new CCodeConditionalExpression (free_func_isnull, new CCodeConstant ("NULL"), ccomma_element_free));
var cfreecall = new CCodeFunctionCall (new CCodeIdentifier (get_ccode_free_function (gnode_type)));
cfreecall.add_argument (new CCodeIdentifier ("self"));
_g_node_free_all_node (GNode* node,
GDestroyNotify free_func)
{
- (node->data == NULL) ? NULL : free_func (node->data);
+ (node->data == NULL) ? NULL : (free_func (node->data), NULL);
return FALSE;
}
_g_node_free_all (GNode* self,
GDestroyNotify free_func)
{
- (free_func == NULL) ? NULL : g_node_traverse (self, G_POST_ORDER, G_TRAVERSE_ALL, -1, (GNodeTraverseFunc) _g_node_free_all_node, free_func);
+ (free_func == NULL) ? NULL : (g_node_traverse (self, G_POST_ORDER, G_TRAVERSE_ALL, -1, (GNodeTraverseFunc) _g_node_free_all_node, free_func), NULL);
g_node_destroy (self);
}
_g_node_free_all_node (GNode* node,
GDestroyNotify free_func)
{
- (node->data == NULL) ? NULL : free_func (node->data);
+ (node->data == NULL) ? NULL : (free_func (node->data), NULL);
return FALSE;
}
_g_node_free_all (GNode* self,
GDestroyNotify free_func)
{
- (free_func == NULL) ? NULL : g_node_traverse (self, G_POST_ORDER, G_TRAVERSE_ALL, -1, (GNodeTraverseFunc) _g_node_free_all_node, free_func);
+ (free_func == NULL) ? NULL : (g_node_traverse (self, G_POST_ORDER, G_TRAVERSE_ALL, -1, (GNodeTraverseFunc) _g_node_free_all_node, free_func), NULL);
g_node_destroy (self);
}