From 47076559628d71c128e14e11147ce36b92677885 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 14 Jan 2016 17:50:11 +0100 Subject: codegen: simplify FdType MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Acked-by: Frediano Ziglio --- python_modules/ptypes.py | 8 ++++---- 1 file 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() -- cgit v1.2.3