[gtk/wip/baedert/for-master] builder: Use default size of 8 for the ObjectProperty arrays
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master] builder: Use default size of 8 for the ObjectProperty arrays
- Date: Thu, 11 Jun 2020 13:31:35 +0000 (UTC)
commit 53914a9b8e791f8a7d8bac4cddc8547456f4b6c6
Author: Timm Bäder <mail baedert org>
Date: Thu Jun 11 15:30:34 2020 +0200
builder: Use default size of 8 for the ObjectProperty arrays
gtk/gtkbuilder.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c
index 5caef27bf6..d14b618c5f 100644
--- a/gtk/gtkbuilder.c
+++ b/gtk/gtkbuilder.c
@@ -481,11 +481,11 @@ object_properties_add (ObjectProperties *self,
const GValue *value)
{
if (!self->names)
- self->names = g_ptr_array_new ();
+ self->names = g_ptr_array_sized_new (8);
if (!self->values)
{
- self->values = g_array_new (FALSE, FALSE, sizeof (GValue));
+ self->values = g_array_sized_new (FALSE, FALSE, sizeof (GValue), 8);
g_array_set_clear_func (self->values, (GDestroyNotify) g_value_unset);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]