[gtk] 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] builder: Use default size of 8 for the ObjectProperty arrays
- Date: Fri, 19 Jun 2020 03:34:26 +0000 (UTC)
commit c6921cdc9d03967dce0bcf3f88aa4cc20486ce05
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 a6958f7ad5..ed9fbe37bd 100644
--- a/gtk/gtkbuilder.c
+++ b/gtk/gtkbuilder.c
@@ -474,11 +474,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]