The compiler code was full of leaks and nothing really checked on them.
While it's not a big deal per se, per the nature of it, it's still
better to ensure that memory management is well done so that there are
no problems when using it with sanitizers.
So, the source of the problems was not freeing the parser, but that
wasn't enough, more to come...
Otherwise, correct invocation isn't clear from the --help output.
This does not introduce new translated strings: FILE was already
translated.
Signed-off-by: Simon McVittie <smcv@collabora.com>
If we don't do this, the --help text is formatted as though the option
did not expect an argument.
This does not introduce new translated strings: DIRECTORY was already
translated.
Signed-off-by: Simon McVittie <smcv@collabora.com>
The code and strings are the same, so let’s simplify things and reduce
LoC for no functional change.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This fixes a few formatting and newline issues in the strings at the
same time, but nothing major.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Fixes: #3263
The positional parameters are declared as G_OPTION_ARG_FILENAME_ARRAY,
but only the first one is used.
Signed-off-by: Simon McVittie <smcv@collabora.com>
It seems cleaner to store this in the parser, rather than having the
compiler export a global variable that the parser must read.
Signed-off-by: Simon McVittie <smcv@collabora.com>
This hasn't actually done anything since commit 45a04358
"[gircompiler] Clean up parsing" (originally
gobject-introspection@8942500c).
Signed-off-by: Simon McVittie <smcv@collabora.com>
GLib is used a subproject with GObject Introspection and overriding
this binary breaks that usage. For now we will make overriding the
binary conditional until Meson is updated to handle the binary changes.
Since `GITypelib` is exposed in the public libgirepository API, it needs
to be a boxed type. So we either need to add a `copy` method to mirror
the existing `free` method, or switch to refcounting. The latter option
seems better, since a `GITypelib` contains internal state about open
`GModule`s and the semantics for copying that would be potentially
complex.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: #3155
Adapt gi-compile-repository sources to compile against the updated
libgirepository that is included with GLib.
This also renames "g-ir-compiler" to "gi-compile-repository" to avoid
overwriting the existing binary and to simplify the binary name going
forward.