[Xcb-commit] 2 commits - xcb-proto

Jamey Sharp jamey at kemper.freedesktop.org
Thu Jun 15 10:35:06 PDT 2006


 xcb-proto/src/size.py |    2 +-
 xcb-proto/src/type.py |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
diff-tree eb47cf7068788ce6986bcea10e7d027e60af0716 (from dc08dc76c23205126d9520e80752d8ec0ae5e73f)
Author: Jamey Sharp <jamey at minilop.net>
Date:   Thu Jun 15 10:27:40 2006 -0700

    Add a useful assertion message if a type gets multiply declared.

diff --git a/xcb-proto/src/size.py b/xcb-proto/src/size.py
index 8376833..5ead8b2 100755
--- a/xcb-proto/src/size.py
+++ b/xcb-proto/src/size.py
@@ -21,7 +21,7 @@ class AnnotateSize(XMLFilterBase):
 	}
 	header = []
 	def setTypeSize(self, name, size):
-		assert not self.types.has_key(name)
+		assert not self.types.has_key(name), "size of " + name + " declared as both " + str(size) + " and " + str(self.types[name])
 		self.types[name] = size
 
 	struct = None
diff-tree dc08dc76c23205126d9520e80752d8ec0ae5e73f (from 3ceb72975421c1f4387184cad2f5d8c9412759d5)
Author: Jamey Sharp <jamey at minilop.net>
Date:   Thu Jun 15 10:25:46 2006 -0700

    Bugfix: Make type shadowing go the right way in type.py.

diff --git a/xcb-proto/src/type.py b/xcb-proto/src/type.py
index c2f3cdf..8338232 100755
--- a/xcb-proto/src/type.py
+++ b/xcb-proto/src/type.py
@@ -25,7 +25,7 @@ class AnnotateType(XMLFilterBase):
 	def declareType(self, name):
 		assert ':' not in name
 		qname = self.scopes[0] + ':' + name
-		self.map.setdefault(name, []).append(qname)
+		self.map.setdefault(name, []).insert(0, qname)
 	def getQualifiedType(self, name):
 		if ':' in name:
 			return name


More information about the xcb-commit mailing list