| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
With '#pragma once', __APPSTREAM_GLIB_H is never defined.
In file included from /usr/include/libappstream-glib/appstream-glib.h:35:
/usr/include/libappstream-glib/as-utils.h:11:2: error: #error "Only <appstream-glib.h> can be included directly."
#error "Only <appstream-glib.h> can be included directly."
^~~~~
Fixes: 87b7483e ("Use '#pragma once' to avoid a lot of boilerplate")
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Using GObject Introspection we were creating an object using GLib.Bytes.new(buf)
where buf was a python str object. This created a GBytes object with no
trailing NUL char but we were expecting a NUL-terminated string when both doing
fnmatch() and also processing the XML. Support this by guarding fnmatch and
also by using the string length when using the GMarkupParseContext.
|
|
|
|
|
|
|
| |
This adds an optional flag that allows the node parser to ignore any nodes that
do not match the native languages of the user. This increases startup speed of
gnome-software by ~40ms but also drops the RSS by a massive 12Mb for the Fedora
AppStream file.
|
| |
|
| |
|
|
|
|
| |
As ebassi pointed out, gchar* is NUL-terminated by definition...
|
|
|
|
|
|
| |
Using the length of -1 for 'unknown' breaks the GIR-generated bindings.
This breaks API and ABI and the soname has been updated to reflect this.
|
| |
|
| |
|
|
|
|
|
| |
This is optional, but enabled by default. Use --disable-dep11 to remove the
libyaml dependancy.
|
| |
|
|
|
|
| |
We may wish to sort the tags in the file when outputting human-readable XML.
|
|
|
|
| |
This allows us to find a tag with a specific attribute.
|
|
|
|
|
| |
This simply adds an understore to the tag name which marks it as translatable
for intltool.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Comments are stored as internal attributes to avoid growing the size of
AsNodeData beyond 32 bits, although there is a performance penalty for this.
As comments are not often encountered in documents (and not at all in the
AppStream metadata fast path) this is probably okay.
By default comments are not loaded from the document, use
%AS_NODE_FROM_XML_FLAG_KEEP_COMMENTS when loading to enable this.
|
|
|
|
| |
This allows us to process all paragraphs in the AppStream description.
|
| |
|
|
|
|
|
|
|
| |
AppStream is a 'destination' format, so we don't want to try to parse the text
data and reassemble strings and strip leading whitespace. However, as AsNode is
used by AppData too (a source format) we just need to add a new flag to make
this configurable.
|
|
|
|
|
|
|
|
|
|
|
| |
This has a drawback that we have to convert from string->enum quite a lot, but
it turns out that the enum direct integer compare (compared to a strcmp) more
than makes up for this. It also reduces the amount of small malloc()s when
parsing metadata
This speeds up parsing by ~7% and reduces the amount of memory required by ~5%.
NOTE: the AsNodeData struct was re-ordered so it packs again into 32 bytes.
|
|
|
|
|
| |
This allows us to keep up with the latest API and still write metadata
compatible with old applications not using libappstream-glib or libappstream.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
By introducing as_node_take_data() we can take ownership of the string data,
and avoid an extra g_strdup/g_free for each tag processed.
This speeds up reading the sample data by ~5%.
|
| |
|
| |
|
|
|
|
|
| |
We use <lang percentage=100>en_GB</lang> so the language itself has to be the
text with the length, although used internally as the key.
|
|
|