[Xcb] [PULL proto] Remove valueparam support from xcbgen parsers and schema definition
Christian Linhart
chris at DemoRecorder.com
Sun Feb 22 00:53:49 PST 2015
Hi Jaya,
I have merged your patch to upstream:
http://cgit.freedesktop.org/xcb/proto/commit/?id=4c550465934164aab2449a125f75f4ca07816233
Thank you for your patch.
Chris
On 12/25/14 13:38, Christian Linhart wrote:
> Hi Jaya,
>
> Thank you for this patch.
>
> Your patch is fine under the condition that all instances of
> valueparam are removed from the protocol definitions before.
> I.e. This patch can be applied after all of your valueparam->switch
> patches are applied. ( or together with them. )
>
> Therefore:
>
> Reviewed-by: Christian Linhart <chris at demorecorder.com>
>
> Chris
>
> P.S.: valueparam should also be removed from the documentation
> in http://cgit.freedesktop.org/xcb/proto/tree/doc/xml-xcb.txt.
>
> Can you please make a patch which does this?
>
> On 12/23/14 18:33, Jaya Tiwari wrote:
>> 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>
>> ---
>> src/xcb.xsd | 11 -----------
>> xcbgen/expr.py | 7 -------
>> xcbgen/xtypes.py | 7 -------
>> 3 files changed, 25 deletions(-)
>>
>> diff --git a/src/xcb.xsd b/src/xcb.xsd
>> index 85f5bc2..6c70cdd 100644
>> --- a/src/xcb.xsd
>> +++ b/src/xcb.xsd
>> @@ -182,15 +182,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" />
>> @@ -296,7 +287,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" />
>> @@ -306,7 +296,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 e4fb06e..6b70204 100644
>> --- a/xcbgen/expr.py
>> +++ b/xcbgen/expr.py
>> @@ -61,13 +61,6 @@ class Expression(object):
>> # Standard list with a fieldref
>> self.lenfield_name = elt.text
>>
>> - 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 45d7568..b4cbce0 100644
>> --- a/xcbgen/xtypes.py
>> +++ b/xcbgen/xtypes.py
>> @@ -184,8 +184,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
>> @@ -328,11 +326,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
>>
>>
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb
More information about the Xcb
mailing list