diff options
Diffstat (limited to 'python_modules')
-rw-r--r-- | python_modules/marshal.py | 2 | ||||
-rw-r--r-- | python_modules/ptypes.py | 18 |
2 files changed, 4 insertions, 16 deletions
diff --git a/python_modules/marshal.py b/python_modules/marshal.py index 4e98993..74f3a54 100644 --- a/python_modules/marshal.py +++ b/python_modules/marshal.py @@ -234,7 +234,7 @@ def write_array_marshaller(writer, member, array, container_src, scope): def write_pointer_marshaller(writer, member, src): t = member.member_type ptr_func = write_marshal_ptr_function(writer, t.target_type) - submarshaller = "spice_marshaller_get_ptr_submarshaller(m, %d)" % (1 if member.get_fixed_nw_size() == 8 else 0) + submarshaller = "spice_marshaller_get_ptr_submarshaller(m)" if member.has_attr("marshall"): rest_args = "" if t.target_type.is_array(): diff --git a/python_modules/ptypes.py b/python_modules/ptypes.py index 7dca78d..05c594e 100644 --- a/python_modules/ptypes.py +++ b/python_modules/ptypes.py @@ -4,8 +4,6 @@ import types _types_by_name = {} _types = [] -default_pointer_size = 4 - def type_exists(name): return name in _types_by_name @@ -490,7 +488,6 @@ class PointerType(Type): Type.__init__(self) self.name = None self.target_type = target_type - self.pointer_size = default_pointer_size def __str__(self): return "%s*" % (str(self.target_type)) @@ -499,9 +496,6 @@ class PointerType(Type): self.target_type = self.target_type.resolve() return self - def set_ptr_size(self, new_size): - self.pointer_size = new_size - def is_fixed_nw_size(self): return True @@ -509,19 +503,13 @@ class PointerType(Type): return True def primitive_type(self): - if self.pointer_size == 4: - return "uint32" - else: - return "uint64" + return "uint32" def get_fixed_nw_size(self): - return self.pointer_size + return 4 def c_type(self): - if self.pointer_size == 4: - return "uint32_t" - else: - return "uint64_t" + return "uint32_t" def contains_extra_size(self): return True |