resource: Add g_resource[s]_has_children

These functions avoid allocating the children array when it is
not needed.
This commit is contained in:
Matthias Clasen
2024-09-06 00:25:05 -04:00
committed by Philip Withnall
parent cb5209282b
commit a14241c895
3 changed files with 100 additions and 0 deletions

View File

@@ -119,6 +119,12 @@ gboolean g_resources_get_info (const char *path,
guint32 *flags,
GError **error);
GIO_AVAILABLE_IN_2_84
gboolean g_resource_has_children (GResource *resource,
const char *path);
GIO_AVAILABLE_IN_2_84
gboolean g_resources_has_children (const char *path);
GIO_AVAILABLE_IN_2_32
void g_static_resource_init (GStaticResource *static_resource);