mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-28 10:07:13 +02:00
gdbus-codegen: Add support for pragma inclusion guard
The #pragma once is widely supported preprocessor directive that can be used instead of include guards. This adds support for using optionally this directive instead of include guards. https://bugzilla.gnome.org/show_bug.cgi?id=791015
This commit is contained in:
@@ -163,6 +163,8 @@ def codegen_main():
|
||||
help='Generate autocleanup support')
|
||||
arg_parser.add_argument('--generate-docbook', metavar='OUTFILES',
|
||||
help='Generate Docbook in OUTFILES-org.Project.IFace.xml')
|
||||
arg_parser.add_argument('--pragma-once', action='store_true',
|
||||
help='Use "pragma once" as the inclusion guard')
|
||||
arg_parser.add_argument('--annotate', nargs=3, action='append', metavar='WHAT KEY VALUE',
|
||||
help='Add annotation (may be used several times)')
|
||||
arg_parser.add_argument('--output-directory', metavar='OUTDIR', default='',
|
||||
@@ -204,7 +206,8 @@ def codegen_main():
|
||||
args.c_generate_autocleanup,
|
||||
docbook_gen,
|
||||
h, c,
|
||||
header_name)
|
||||
header_name,
|
||||
args.pragma_once)
|
||||
ret = gen.generate()
|
||||
h.close()
|
||||
c.close()
|
||||
|
Reference in New Issue
Block a user