mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +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
|
||||
if c_code:
|
||||
header_name = c_code + '.h'
|
||||
h = open(path.join(outdir, header_name), 'w')
|
||||
c = open(path.join(outdir, c_code + '.c'), 'w')
|
||||
gen = codegen.CodeGenerator(all_ifaces,
|
||||
with open(path.join(outdir, header_name), 'w') as outfile:
|
||||
gen = codegen.HeaderCodeGenerator(all_ifaces,
|
||||
args.c_namespace,
|
||||
args.interface_prefix,
|
||||
args.c_generate_object_manager,
|
||||
args.c_generate_autocleanup,
|
||||
docbook_gen,
|
||||
h, c,
|
||||
header_name,
|
||||
args.pragma_once)
|
||||
ret = gen.generate()
|
||||
h.close()
|
||||
c.close()
|
||||
args.pragma_once,
|
||||
outfile)
|
||||
gen.generate()
|
||||
|
||||
with open(path.join(outdir, c_code + '.c'), 'w') as outfile:
|
||||
gen = codegen.CodeGenerator(all_ifaces,
|
||||
args.c_namespace,
|
||||
args.c_generate_object_manager,
|
||||
header_name,
|
||||
docbook_gen,
|
||||
outfile)
|
||||
gen.generate()
|
||||
|
||||
sys.exit(0)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user