Add reference counted strings

Desktop / GNOME / GLib - Emmanuele Bassi [gnome.org] - 9 July 2018 09:11 EDT

The last part of the reference counting saga.

Now that we have:

- reference counter types- reference counted allocations

we can finally using reference counted allocations to avoid creating a new String type, and reimplementing every single string-based API.

00a723f59 Add reference counted strings
docs/reference/glib/glib-docs.xml | 1 +
docs/reference/glib/glib-sections.txt | 8 ++
glib/Makefile.am | 2 +
glib/glib-autocleanups.h | 1 +
glib/glib.h | 1 +
glib/grefstring.c | 175 ++++++++++++++++++++++++++++++++++
glib/grefstring.h | 38 ++++++++
glib/meson.build | 2 +
glib/tests/Makefile.am | 1 +
glib/tests/autoptr.c | 8 ++
glib/tests/meson.build | 1 +
glib/tests/refstring.c | 70 ++++++++++++++
12 files changed, 308 insertions(+)

Upstream: git.gnome.org


  • Share