summaryrefslogtreecommitdiff
path: root/gsk
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2016-12-26 12:40:36 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2016-12-29 17:41:59 +0800
commit1e084567f919fa902e70e944b0bebb02443d1d36 (patch)
tree5e175dd6ca55f27d0dcda263085f886f8e5095d3 /gsk
parente7f4863814735f20235782d550976e0173904796 (diff)
downloadgtk+-1e084567f919fa902e70e944b0bebb02443d1d36.tar.gz
gsk/gskrendernodeimpl.c: Avoid VLAs
Use g_newa() instead of VLAs, as VLAs may never be supported by some compilers as it became optional in C11 and there are concerns about their implementations in compilers that do support it. https://bugzilla.gnome.org/show_bug.cgi?id=773299
Diffstat (limited to 'gsk')
-rw-r--r--gsk/gskrendernodeimpl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c
index cade17a956..6a632f086e 100644
--- a/gsk/gskrendernodeimpl.c
+++ b/gsk/gskrendernodeimpl.c
@@ -247,7 +247,7 @@ gsk_linear_gradient_node_real_deserialize (GVariant *variant,
&iter);
n_stops = g_variant_iter_n_children (iter);
- GskColorStop stops[n_stops];
+ GskColorStop *stops = g_newa (GskColorStop, n_stops);
for (i = 0; i < n_stops; i++)
{
double offset;
@@ -1910,7 +1910,7 @@ gsk_container_node_deserialize (GVariant *variant,
i = 0;
n_children = g_variant_iter_init (&iter, variant);
- GskRenderNode *children[n_children];
+ GskRenderNode **children = g_newa (GskRenderNode *, n_children);
while (g_variant_iter_loop (&iter, "(uv)", &child_type, &child_variant))
{
@@ -2784,7 +2784,7 @@ gsk_shadow_node_deserialize (GVariant *variant,
}
n_shadows = g_variant_iter_n_children (iter);
- GskShadow shadows[n_shadows];
+ GskShadow *shadows = g_newa (GskShadow, n_shadows);
for (i = 0; i < n_shadows; i++)
{
double dx, dy, radius;