mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-16 07:04:29 +00:00
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:
parent
cbb0d7ba69
commit
1ca906008e
@ -61,7 +61,7 @@ splice (GListStore *store,
|
|||||||
guint *numbers,
|
guint *numbers,
|
||||||
guint added)
|
guint added)
|
||||||
{
|
{
|
||||||
GObject *objects[added];
|
GObject **objects = g_newa (GObject *, added);
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
for (i = 0; i < added; i++)
|
for (i = 0; i < added; i++)
|
||||||
|
@ -56,7 +56,7 @@ splice (GListStore *store,
|
|||||||
guint *numbers,
|
guint *numbers,
|
||||||
guint added)
|
guint added)
|
||||||
{
|
{
|
||||||
GObject *objects[added];
|
GObject **objects = g_newa (GObject *, added);
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
for (i = 0; i < added; i++)
|
for (i = 0; i < added; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user