summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2020-07-24 16:25:24 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2020-07-24 16:25:24 +0800
commit89f7d841abab351e3d8ab0fd39a00531fb1a9781 (patch)
tree248d625918a034012fb349466452c3791d2bbdcb
parent7e2fceebcaba7023c67a1fa8d1b4dcdbe09fdefb (diff)
downloadgtk+-89f7d841abab351e3d8ab0fd39a00531fb1a9781.tar.gz
gdk/gdkarrayimpl.c: Fix build on Visual Studio
It seems like initializing something to an empty array using `{}` is a GCCism, so just stuff a 0 within the braces to accomplish the same thing.
-rw-r--r--gdk/gdkarrayimpl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdk/gdkarrayimpl.c b/gdk/gdkarrayimpl.c
index b08b43b2c2..6692245aa7 100644
--- a/gdk/gdkarrayimpl.c
+++ b/gdk/gdkarrayimpl.c
@@ -73,7 +73,7 @@ gdk_array(init) (GdkArray *self)
self->end = self->start;
self->end_allocation = self->start + GDK_ARRAY_PREALLOC;
#ifdef GDK_ARRAY_NULL_TERMINATED
- *self->start = *(_T_[1]) {};
+ *self->start = *(_T_[1]) { 0 };
#endif
#else
self->start = NULL;
@@ -165,7 +165,7 @@ gdk_array(reserve) (GdkArray *self,
if (self->start == NULL)
{
self->start = g_new (_T_, new_size);
- *self->start = *(_T_[1]) {};
+ *self->start = *(_T_[1]) { 0 };
}
else
#endif