Commit Graph

3 Commits

Author SHA1 Message Date
Sebastian Wilhelmi
247e7b6995 Fix LGPL in header of gvarianttype-private.h 2025-03-21 17:40:53 +00:00
Christian Hergert
72f217e25a gvarianttype: avoid walking type string twice to hash
We already need to walk the string to determine the length of it, so just
hash the string at the same time.
2024-09-24 10:54:32 -07:00
Christian Hergert
9879b7152a gvarianttype: reduce g_variant_type_equal() overhead
Previously, g_variant_type_equal() would walk the strings multiple times.
In debug builds, you initially have the type checks for validity. But
also you walk the string to determine its length only to memcmp it after.

Instead, this does the comparison while walking the string for length.
2024-09-24 10:54:26 -07:00