From bafea4e550d8b07ea1b754404fe172216845a685 Mon Sep 17 00:00:00 2001 From: Karl Ramm Date: Mon, 3 Aug 2009 04:55:57 +0000 Subject: Work around a... sign extension edge case? --- python/zephyr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python') diff --git a/python/zephyr.py b/python/zephyr.py index 61beea5..f316bde 100755 --- a/python/zephyr.py +++ b/python/zephyr.py @@ -176,7 +176,7 @@ class _ZTimeval_Net(_ZTimeval): """When _ZTimeval is used in a ZUnique_Id_t, the time parts are stored in network byte order. Handle this by faking up a different type.""" def pformat(self): - return pformat_timeval(socket.ntohl(self.tv_sec), socket.ntohl(self.tv_usec)) + return pformat_timeval(socket.ntohl(self.tv_sec & 0xffffffff), socket.ntohl(self.tv_usec & 0xffffffff)) # typedef struct _ZUnique_Id_t { class ZUnique_Id_t(Structure): -- cgit v1.2.3