[gtk] testsuite/gtk/slicelistmodel.c: Avoid VLAs



commit a0e8cd5baca66f1e575c7af401582b1f77ac1295
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Jan 21 13:49:20 2019 +0800

    testsuite/gtk/slicelistmodel.c: Avoid VLAs
    
    Unfortunately VLA's are unlikely to be supported on any Visual Studio
    versions, although it is C99, so replace it with g_newa() calls.

 testsuite/gtk/slicelistmodel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/testsuite/gtk/slicelistmodel.c b/testsuite/gtk/slicelistmodel.c
index 960133c805..01717c8f51 100644
--- a/testsuite/gtk/slicelistmodel.c
+++ b/testsuite/gtk/slicelistmodel.c
@@ -74,7 +74,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++)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]