Fix INCLUDE_GUARD in create-module.py
This patch fixes two separate issues: first, it replaces "-" by "_" in addition to capitalizing module name when creating include guards, second, it names it consistently with the rest of ns-3.
This commit is contained in:
@@ -344,7 +344,7 @@ def main(argv):
|
||||
model_cc.close()
|
||||
|
||||
model_h = file(os.path.join(moduledir, "model", "%s.h" % modname), "wt")
|
||||
model_h.write(MODEL_H_TEMPLATE % dict(MODULE=modname, INCLUDE_GUARD="__%s_H__" % (modname.upper()),))
|
||||
model_h.write(MODEL_H_TEMPLATE % dict(MODULE=modname, INCLUDE_GUARD="%s_H" % (modname.replace("-", "_").upper()),))
|
||||
model_h.close()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user