[Xcb-commit] xcb/proto: src xcbgen

Christian Linhart clinhart at kemper.freedesktop.org
Sun Feb 22 00:50:34 PST 2015


 src/xcb.xsd      |   11 -----------
 xcbgen/expr.py   |    7 -------
 xcbgen/xtypes.py |    7 -------
 3 files changed, 25 deletions(-)

New commits:
commit 4c550465934164aab2449a125f75f4ca07816233
Author: Jaya Tiwari <tiwari.jaya18 at gmail.com>
Date:   Tue Dec 23 12:33:13 2014 -0500

    Remove valueparam support from xcbgen parsers and schema definition
    
    Removed all the valueparam occurences from parsers and xml schema as
    well along with all the protocol
    definitions as valueparam has been replaced by switch bit-case
    
    Signed-off-by: Jaya Tiwari <tiwari.jaya18 at gmail.com>
    Reviewed-by: Christian Linhart <chris at demorecorder.com>

diff --git a/src/xcb.xsd b/src/xcb.xsd
index 5a4ab91..c1dce3e 100644
--- a/src/xcb.xsd
+++ b/src/xcb.xsd
@@ -195,15 +195,6 @@ authorization from the authors.
     </xsd:complexType>
   </xsd:element>
 
-  <!-- BITMASK/LISTofVALUE parameter pairs. -->
-  <xsd:element name="valueparam">
-    <xsd:complexType>
-      <xsd:attribute name="value-mask-type" type="xsd:string" use="required" />
-      <xsd:attribute name="value-mask-name" type="xsd:string" use="required" />
-      <xsd:attribute name="value-list-name" type="xsd:string" use="required" />
-    </xsd:complexType>
-  </xsd:element>
-
   <xsd:group name="fields">
     <xsd:choice>
       <xsd:element ref="pad" />
@@ -309,7 +300,6 @@ authorization from the authors.
             <xsd:choice minOccurs="0" maxOccurs="unbounded">
               <xsd:group ref="fields" />
               <xsd:element ref="exprfield" />
-              <xsd:element ref="valueparam" />
             </xsd:choice>
             <xsd:choice minOccurs="0" maxOccurs="1">
               <xsd:element ref="switch" />
@@ -319,7 +309,6 @@ authorization from the authors.
                 <xsd:sequence>
                   <xsd:choice minOccurs="1" maxOccurs="unbounded">
                     <xsd:group ref="fields" />
-                    <xsd:element ref="valueparam" />
                   </xsd:choice>
                   <xsd:choice minOccurs="0" maxOccurs="1">
                     <xsd:element ref="switch" />
diff --git a/xcbgen/expr.py b/xcbgen/expr.py
index e6895ff..e4ee8c6 100644
--- a/xcbgen/expr.py
+++ b/xcbgen/expr.py
@@ -68,13 +68,6 @@ class Expression(object):
             self.lenfield_name = elt.text
             self.lenfield_type = elt.get('type')
 
-        elif elt.tag == 'valueparam':
-            # Value-mask.  The length bitmask is described by attributes.
-            self.lenfield_name = elt.get('value-mask-name')
-            self.lenfield_type = elt.get('value-mask-type')
-            self.lenwire = True
-            self.bitfield = True
-
         elif elt.tag == 'op':
             # Op field.  Need to recurse.
             self.op = elt.get('op')
diff --git a/xcbgen/xtypes.py b/xcbgen/xtypes.py
index 8ecbaa2..4d6bbc0 100644
--- a/xcbgen/xtypes.py
+++ b/xcbgen/xtypes.py
@@ -185,8 +185,6 @@ class ListType(Type):
         if elt.tag == 'list':
             elts = list(elt)
             self.expr = Expression(elts[0] if len(elts) else elt, self)
-        elif elt.tag == 'valueparam':
-            self.expr = Expression(elt, self)
 
         self.size = member.size if member.fixed_size() else None
         self.nmemb = self.expr.nmemb if self.expr.fixed_size() else None
@@ -329,11 +327,6 @@ class ComplexType(Type):
                 fkey = child.get('type')
                 type = ListType(child, module.get_type(fkey), *self.lenfield_parent)
                 visible = True
-            elif child.tag == 'valueparam':
-                field_name = child.get('value-list-name')
-                fkey = 'CARD32'
-                type = ListType(child, module.get_type(fkey), *self.lenfield_parent)
-                visible = True
             elif child.tag == 'switch':
                 field_name = child.get('name')
                 # construct the switch type name from the parent type and the field name


More information about the xcb-commit mailing list