diff --git a/scripts/mk_util.py b/scripts/mk_util.py index 19331ee50..01d594adf 100644 --- a/scripts/mk_util.py +++ b/scripts/mk_util.py @@ -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) out = open(hpp, 'w') 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') if export: 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' % (TYPE2CTYPE[param[1]], to_c_method(param[0]), TYPE2GETTER[param[1]], param[0], pyg_default_as_c_literal(param))) out.write('};\n') + out.write('#endif\n') if is_verbose(): print "Generated '%s'" % hpp