[PATCH 2/6] Add CARD64/INT64 protocol types

Keith Packard keithp at keithp.com
Tue Nov 5 16:39:02 PST 2013


No reason to make people use two 32-bit values when every modern
compiler has native 64-bit objects.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 xcbgen/state.py  | 2 ++
 xcbgen/xtypes.py | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/xcbgen/state.py b/xcbgen/state.py
index ae3d2d4..10a8722 100644
--- a/xcbgen/state.py
+++ b/xcbgen/state.py
@@ -74,9 +74,11 @@ class Module(object):
         self.add_type('CARD8', '', ('uint8_t',), tcard8)
         self.add_type('CARD16', '', ('uint16_t',), tcard16)
         self.add_type('CARD32', '', ('uint32_t',), tcard32)
+        self.add_type('CARD64', '', ('uint64_t',), tcard64)
         self.add_type('INT8', '', ('int8_t',), tint8)
         self.add_type('INT16', '', ('int16_t',), tint16)
         self.add_type('INT32', '', ('int32_t',), tint32)
+        self.add_type('INT64', '', ('int64_t',), tint64)
         self.add_type('BYTE', '', ('uint8_t',), tcard8)
         self.add_type('BOOL', '', ('uint8_t',), tcard8)
         self.add_type('char', '', ('char',), tchar)
diff --git a/xcbgen/xtypes.py b/xcbgen/xtypes.py
index 5469cd9..5012f0b 100644
--- a/xcbgen/xtypes.py
+++ b/xcbgen/xtypes.py
@@ -103,9 +103,11 @@ class SimpleType(Type):
 tcard8 = SimpleType(('uint8_t',), 1)
 tcard16 = SimpleType(('uint16_t',), 2)
 tcard32 = SimpleType(('uint32_t',), 4)
+tcard64 = SimpleType(('uint64_t',), 8)
 tint8 =  SimpleType(('int8_t',), 1)
 tint16 = SimpleType(('int16_t',), 2)
 tint32 = SimpleType(('int32_t',), 4)
+tint64 = SimpleType(('int64_t',), 8)
 tchar =  SimpleType(('char',), 1)
 tfloat = SimpleType(('float',), 4)
 tdouble = SimpleType(('double',), 8)
-- 
1.8.4.2



More information about the xorg-devel mailing list