Does GLib have a data type that can be used as a LIFO (stack) collection? It does have lists, queues, hash tables and such but I can't seem to find a stack data type.
There is a trash stack type but it was designed with a specific purpose in mind and it has also been deprecated since version 2.48.
What can be used as a stack in GLib?
A bit late to the party, but a more light-weight approach to a stack would be using the singly-linked list type GSList, which doesn't require an explicit container object.
A wrapper function for a proper "pop" that returns the element could then look something like this: