We now sort the matchers and remove unnecessary duplicates (like
removing standard:type when we already match standard:*), so that we can
do more complex operations on them easily in later commits.
* gio/gfileattribute.c: (_g_file_attribute_value_get_string,
_g_file_attribute_value_set_string): These use
G_FILE_ATTRIBUTE_TYPE_STRING, which is documented as UTF-8, so
document these private functions as using UTF-8.
* gio/gfileinfo.c: (g_file_info_get_attribute_string,
g_file_info_set_attribute_string, and stringv versions):
Document that the strings are UTF-8 because the implementation uses
those private functions, that use UTF-8.
This helps language bindings (such as glibmm) whose API
distinguishes between known and unknown encodings.
This patch and the previous ones fixes the performance issues noted in
Bug 587089 – lookup_attribute() takes too much CPU
It increases performance for querying attributes by ~15% in my tests.
2009-02-17 Ryan Lortie <desrt@desrt.ca>
* gfileinfo.c: unref the destination's attribute matcher before
overwriting it.
svn path=/trunk/; revision=7879
2008-07-01 Cody Russell <bratsche@gnome.org>
* gio/gioenums.h:
* gio/giotypes.h:
Moved all relevant typedefs into these files.
* gio/*.[ch]:
Updated wrt added files.
Split types into separate file for easier maintainership. (#538564)
svn path=/trunk/; revision=7127
2008-06-16 Michael Natterer <mitch@imendio.com>
* *.c: chain up unconditionally in finalize() and dispose(). Also
don't dereference these function pointers when calling them since
that has no meaning at all.
svn path=/trunk/; revision=7048
2008-01-10 Murray Cumming <murrayc@murrayc.com>
* gfileinfo.c: GFileInfo description: Mention
how to actually set attributes in a GFile and how to discover
which attributes are settable. Bug #508378.
svn path=/trunk/; revision=6293
2008-01-03 Alexander Larsson <alexl@redhat.com>
* gfileinfo.c:
Handle NULL attribute matchers safely, as we return this
for empty attribute matcher strings.
svn path=/trunk/; revision=6238
2007-12-14 Alexander Larsson <alexl@redhat.com>
* Makefile.am:
* gfileattribute.[ch]:
* gfileattribute-priv.h:
Move GFileAttributeValue to a private header, as
its sort of ugly.
* gfile.[ch]:
Make set_attribute take a type + a pointer instead
of a GFileAttributeValue.
* gfileinfo.[ch]:
Fix up for above changes.
Add g_file_info_get_attribute_data to get
all info in one call, g_file_info_get_attribute_status
to get the status and g_file_info_get_attribute_as_string.
* gio.symbols:
* glocalfile.c:
* glocalfileinfo.[ch]:
Update for changes
* gunixmounts.c:
Make _guess_type static.
svn path=/trunk/; revision=6129
2007-12-12 Alexander Larsson <alexl@redhat.com>
* gfileattribute.c:
* gfileinfo.[ch]:
* glocalfile.c:
* glocalfileinfo.c:
Make attribute namespace separator "::" instead of ":".
Use - instead of _ as separator in attribute names.
svn path=/trunk/; revision=6104