summaryrefslogtreecommitdiff
path: root/spice_codegen.py
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-06-23 16:20:33 +0200
committerAlexander Larsson <alexl@redhat.com>2010-06-23 16:33:07 +0200
commitdc8625c7e156a2b1eff16397b4be039ac5da9089 (patch)
tree8d80846ac35bdd7df83ca76fd2e2f4e4c442d609 /spice_codegen.py
parent929245bacd8e9f1ba170e019f107738e75a599ad (diff)
Make pointers 32bit in new protocol format
Diffstat (limited to 'spice_codegen.py')
-rwxr-xr-xspice_codegen.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/spice_codegen.py b/spice_codegen.py
index 1d2314a..3a9989d 100755
--- a/spice_codegen.py
+++ b/spice_codegen.py
@@ -115,6 +115,8 @@ parser.add_option("-i", "--include",
help="Include FILE in generated code")
parser.add_option("--prefix", dest="prefix",
help="set public symbol prefix", default="")
+parser.add_option("--ptrsize", dest="ptrsize",
+ help="set default pointer size", default="4")
(options, args) = parser.parse_args()
@@ -124,6 +126,8 @@ if len(args) == 0:
if len(args) == 1:
parser.error("No destination file specified")
+ptypes.default_pointer_size = int(options.ptrsize)
+
proto_file = args[0]
dest_file = args[1]
proto = spice_parser.parse(proto_file)