mirror of
https://github.com/Z3Prover/z3
synced 2025-06-10 16:13:25 +00:00
added missing #ifndef to automatically generated hpp files
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
684f573c3c
commit
60ebc5c4dd
1 changed files with 3 additions and 0 deletions
|
@ -1487,6 +1487,8 @@ def def_module_params(module_name, export, params, class_name=None, description=
|
||||||
hpp = os.path.join(dirname, '%s.hpp' % class_name)
|
hpp = os.path.join(dirname, '%s.hpp' % class_name)
|
||||||
out = open(hpp, 'w')
|
out = open(hpp, 'w')
|
||||||
out.write('// Automatically generated file\n')
|
out.write('// Automatically generated file\n')
|
||||||
|
out.write('#ifndef __%s_HPP_\n' % class_name.upper())
|
||||||
|
out.write('#define __%s_HPP_\n' % class_name.upper())
|
||||||
out.write('#include"params.h"\n')
|
out.write('#include"params.h"\n')
|
||||||
if export:
|
if export:
|
||||||
out.write('#include"gparams.h"\n')
|
out.write('#include"gparams.h"\n')
|
||||||
|
@ -1518,6 +1520,7 @@ def def_module_params(module_name, export, params, class_name=None, description=
|
||||||
out.write(' %s %s() const { return p.%s("%s", %s); }\n' %
|
out.write(' %s %s() const { return p.%s("%s", %s); }\n' %
|
||||||
(TYPE2CTYPE[param[1]], to_c_method(param[0]), TYPE2GETTER[param[1]], param[0], pyg_default_as_c_literal(param)))
|
(TYPE2CTYPE[param[1]], to_c_method(param[0]), TYPE2GETTER[param[1]], param[0], pyg_default_as_c_literal(param)))
|
||||||
out.write('};\n')
|
out.write('};\n')
|
||||||
|
out.write('#endif\n')
|
||||||
if is_verbose():
|
if is_verbose():
|
||||||
print "Generated '%s'" % hpp
|
print "Generated '%s'" % hpp
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue