diff --git a/utils/generate-command-code.py b/utils/generate-command-code.py index dc66ce81f..2d7cc5b0d 100755 --- a/utils/generate-command-code.py +++ b/utils/generate-command-code.py @@ -242,7 +242,8 @@ class Argument(object): def to_c_name(str): return str.replace(":", "").replace(".", "_").replace("$", "_")\ - .replace("^", "_").replace("*", "_").replace("-", "_") + .replace("^", "_").replace("*", "_").replace("-", "_") \ + .replace("\\", "_").replace("+", "_") class ReplySchema(object): @@ -285,7 +286,7 @@ class ReplySchema(object): t = "JSON_TYPE_INTEGER" vstr = ".value.integer=%d" % v - return "%s,\"%s\",%s" % (t, k, vstr) + return "%s,%s,%s" % (t, json.dumps(k), vstr) for k, v in self.schema.items(): if isinstance(v, ReplySchema):