g_slice_free(TMQuery, q);
- }
+}
+/** Add name filter to a query
- The query results will be restricted to tags matching the name. The
- matching is a simple prefix matching. The length to match can be
- limited to allow multiple tags to match a prefix.
- @param q The query to operate on.
- @param name The name to filter.
- @param name_len The number of characters to use (from the beginning).
- @return 0 on succcess, < 0 on error.
If you want it to be a nice API for non-C languages, go all the way and use a `GError`, that will be translated to a proper exception, contains a code and even a message. Not saying it's really worth it, but it seems more like the canonical way of doing it in GLib-using stuff.