[template-glib] expr: no need to ref statements array
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [template-glib] expr: no need to ref statements array
- Date: Wed, 4 May 2022 20:15:35 +0000 (UTC)
commit 58d1f7875129adcf42ab0d52799f89fb4c9399d5
Author: Christian Hergert <chergert redhat com>
Date: Wed May 4 13:14:57 2022 -0700
expr: no need to ref statements array
The parameter is transfer full, so we don't need to ref the array.
src/tmpl-expr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/tmpl-expr.c b/src/tmpl-expr.c
index f8ff635..64f9054 100644
--- a/src/tmpl-expr.c
+++ b/src/tmpl-expr.c
@@ -181,7 +181,7 @@ tmpl_expr_new_stmt_list (GPtrArray *stmts)
g_ptr_array_set_free_func (stmts, (GDestroyNotify)tmpl_expr_unref);
ret = tmpl_expr_new (TMPL_EXPR_STMT_LIST);
- ((TmplExprStmtList *)ret)->stmts = g_ptr_array_ref (stmts);
+ ((TmplExprStmtList *)ret)->stmts = stmts;
return ret;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]