mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 23:46:15 +01:00
gdbus-codegen: Split C header and code generation
The class that generated both C header and code has been split into two classes. These clases are now specialized on creating the header or the body code. All parameters that do not belong to each class have also been deleted, so only the necessary parameters still remain. These also includes the header and code file descriptors, leaving only the corresponding file descriptor necessary for each class. https://bugzilla.gnome.org/show_bug.cgi?id=791015
This commit is contained in:
parent
a66f2f80e0
commit
22772acff8
File diff suppressed because it is too large
Load Diff
@ -197,20 +197,24 @@ def codegen_main():
|
|||||||
c_code = args.generate_c_code
|
c_code = args.generate_c_code
|
||||||
if c_code:
|
if c_code:
|
||||||
header_name = c_code + '.h'
|
header_name = c_code + '.h'
|
||||||
h = open(path.join(outdir, header_name), 'w')
|
with open(path.join(outdir, header_name), 'w') as outfile:
|
||||||
c = open(path.join(outdir, c_code + '.c'), 'w')
|
gen = codegen.HeaderCodeGenerator(all_ifaces,
|
||||||
gen = codegen.CodeGenerator(all_ifaces,
|
args.c_namespace,
|
||||||
args.c_namespace,
|
args.c_generate_object_manager,
|
||||||
args.interface_prefix,
|
args.c_generate_autocleanup,
|
||||||
args.c_generate_object_manager,
|
header_name,
|
||||||
args.c_generate_autocleanup,
|
args.pragma_once,
|
||||||
docbook_gen,
|
outfile)
|
||||||
h, c,
|
gen.generate()
|
||||||
header_name,
|
|
||||||
args.pragma_once)
|
with open(path.join(outdir, c_code + '.c'), 'w') as outfile:
|
||||||
ret = gen.generate()
|
gen = codegen.CodeGenerator(all_ifaces,
|
||||||
h.close()
|
args.c_namespace,
|
||||||
c.close()
|
args.c_generate_object_manager,
|
||||||
|
header_name,
|
||||||
|
docbook_gen,
|
||||||
|
outfile)
|
||||||
|
gen.generate()
|
||||||
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user