summaryrefslogtreecommitdiff
path: root/gtk/gtkarrayimplprivate.h
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2020-04-29 10:01:25 +0200
committerTimm Bäder <mail@baedert.org>2020-05-05 08:20:10 +0200
commit49960972190401ccbaa5bfa0fcc2ab80482490b0 (patch)
tree2c7f4738a2a056658377e4a33f2d8f9383c7ce8a /gtk/gtkarrayimplprivate.h
parent0c4dcd9d576af0f410e1d3b38924420427b7b704 (diff)
downloadgtk+-49960972190401ccbaa5bfa0fcc2ab80482490b0.tar.gz
cssselector: Use a GtkArray to count exact matches
The list here is at most 3 elements long in my tests.
Diffstat (limited to 'gtk/gtkarrayimplprivate.h')
-rw-r--r--gtk/gtkarrayimplprivate.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gtk/gtkarrayimplprivate.h b/gtk/gtkarrayimplprivate.h
index 0027aa5b3e..cfc497e1ab 100644
--- a/gtk/gtkarrayimplprivate.h
+++ b/gtk/gtkarrayimplprivate.h
@@ -96,5 +96,14 @@ gtk_array_free (GtkArray *self,
g_ptr_array_free (self->ptr_array, TRUE);
}
+static inline void **
+gtk_array_get_data (GtkArray *self)
+{
+ if (G_LIKELY (!self->ptr_array))
+ return self->stack_space;
+
+ return self->ptr_array->pdata;
+}
+
#endif