Package: valac-0.12
Version: 0.12.1-2
Severity: minor

Hi,

/usr/share/vala-0.12/vapi/glib-2.0.vapi incorrectly marks an
OptionEntry's arg_description as non-nullable, although passing null
here does actually make sense, see the attached demo program which
produces this output:

        $ ./Demo --help
        Usage:
          Demo [OPTION...] 

        Help Options:
          -h, --help       Show help options

        Application Options:
          -f, --foo=       some description for foo
          -b, --bar        some description for bar

        $

Please note the missing "=" after "--bar".

Best regards

Alexander Kurtz
class Demo : Object {
	static int foo;
	static int bar;

	const OptionEntry[] options = {
		{ "foo", 'f', 0, OptionArg.INT, ref foo, "some description for foo", "" },
		{ "bar", 'b', 0, OptionArg.INT, ref bar, "some description for bar", null },
		{ null }
	};

	static void main(string[] arguments){
		OptionContext context = new OptionContext("");
		context.add_main_entries(options, null);
		context.parse(ref arguments);
	}
}

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to