summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2016-01-14 17:50:11 +0100
committerMarc-André Lureau <marcandre.lureau@redhat.com>2016-03-10 16:01:42 +0100
commit487f914a5dd3db4d39d54c20413434985a5d8de6 (patch)
treee561559571c0cc44ff044d2f580186b8f4f5483a
parentc5ed374a328b054846fd34536270f3f11392af69 (diff)
downloadspice-common-487f914a5dd3db4d39d54c20413434985a5d8de6.tar.gz
spice-common-487f914a5dd3db4d39d54c20413434985a5d8de6.tar.xz
spice-common-487f914a5dd3db4d39d54c20413434985a5d8de6.zip
codegen: simplify FdType
This patch is a left-over from the fd passing commit 267391c8fd as suggested by Frediano Ziglio during review. Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Acked-by: Frediano Ziglio <fziglio@redhat.com> (cherry picked from spice-protocol commit 47076559628d71c128e14e11147ce36b92677885) Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-rw-r--r--python_modules/ptypes.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python_modules/ptypes.py b/python_modules/ptypes.py
index 9c10b57..753d363 100644
--- a/python_modules/ptypes.py
+++ b/python_modules/ptypes.py
@@ -1120,9 +1120,9 @@ class ProtocolType(Type):
return self
class FdType(IntegerType):
-
- def primitive_type(self):
- return "fd"
+ def __init__(self):
+ IntegerType.__init__(self, 0, False)
+ self.name = "fd"
def c_type(self):
return "int"
@@ -1135,4 +1135,4 @@ int32 = IntegerType(32, True)
uint32 = IntegerType(32, False)
int64 = IntegerType(64, True)
uint64 = IntegerType(64, False)
-unix_fd = FdType(1, True)
+unix_fd = FdType()