diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-06-22 16:01:57 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-06-22 16:01:57 +0200 |
commit | c621b2bdf14bbc596ec90e917a2c40fa8dc8a4e8 (patch) | |
tree | 30129ccdba3b97bc5715b89f14629f6947dea6d3 /spice_codegen.py | |
parent | 36fd22a9db6edee0cc1700eeeab36a9f084a31d8 (diff) | |
download | spice-c621b2bdf14bbc596ec90e917a2c40fa8dc8a4e8.tar.gz spice-c621b2bdf14bbc596ec90e917a2c40fa8dc8a4e8.tar.xz spice-c621b2bdf14bbc596ec90e917a2c40fa8dc8a4e8.zip |
Support extra prefix in code generators
This is require when we add a new spice.proto for the old (major 1)
protocol description.
Diffstat (limited to 'spice_codegen.py')
-rwxr-xr-x | spice_codegen.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spice_codegen.py b/spice_codegen.py index 00342500..1d2314a0 100755 --- a/spice_codegen.py +++ b/spice_codegen.py @@ -113,6 +113,8 @@ parser.add_option("-k", "--keep-identical-file", parser.add_option("-i", "--include", action="append", dest="includes", metavar="FILE", help="Include FILE in generated code") +parser.add_option("--prefix", dest="prefix", + help="set public symbol prefix", default="") (options, args) = parser.parse_args() @@ -134,6 +136,8 @@ writer = codegen.CodeWriter() writer.header = codegen.CodeWriter() writer.set_option("source", os.path.basename(proto_file)) +writer.public_prefix = options.prefix + if options.assert_on_error: writer.set_option("assert_on_error") |