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>
This commit is contained in:
Marc-André Lureau 2016-01-14 17:50:11 +01:00 committed by Frediano Ziglio
parent 3fc2221e96
commit 4707655962

View File

@ -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()