testsuite/gtk/[flatten|sort]listmodel.c: Avoid VLA usage

Visual Studio is unlikely to support VLAs at any point, so avoid using
them and use g_newa() instead.
This commit is contained in:
Chun-wei Fan 2018-10-09 16:22:28 +08:00
parent cbb0d7ba69
commit 1ca906008e
2 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ splice (GListStore *store,
guint *numbers,
guint added)
{
GObject *objects[added];
GObject **objects = g_newa (GObject *, added);
guint i;
for (i = 0; i < added; i++)

View File

@ -56,7 +56,7 @@ splice (GListStore *store,
guint *numbers,
guint added)
{
GObject *objects[added];
GObject **objects = g_newa (GObject *, added);
guint i;
for (i = 0; i < added; i++)