Define and use constants for opcode numbers.
Hard coding the opcode numbers in the function just makes it harder to figure out what's going on, but much more to the point, not defining the opcodes in the header makes it impossible to use the generated headers instead of the x11proto headers in the server. The name I settled on is very simple, for an extension by the name of xconf, and a request by the name of list_devices, we get XCB_XCONF_LIST_DEVICES. If this somehow causes problems, we can probably add a _OP somewhere in there, but. Acked-by: Jamey Sharp <jamey@minilop.net> Closes: #8641
This commit is contained in:
parent
c1504691ec
commit
5ec55dc9c0
|
@ -342,7 +342,7 @@ authorization from the authors.
|
|||
</xsl:attribute>
|
||||
<field type="xcb_connection_t *" name="c" />
|
||||
<xsl:apply-templates select="$req/*[not(self::reply)]" mode="param" />
|
||||
<do-request ref="{xcb:xcb-prefix($req/@name)}_request_t" opcode="{$req/@opcode}"
|
||||
<do-request ref="{xcb:xcb-prefix($req/@name)}_request_t" opcode="{translate(xcb:xcb-prefix($req/@name), $lcase, $ucase)}"
|
||||
checked="{$checked}">
|
||||
<xsl:if test="$req/reply">
|
||||
<xsl:attribute name="has-reply">true</xsl:attribute>
|
||||
|
@ -358,6 +358,7 @@ authorization from the authors.
|
|||
<field type="unsigned int" name="sequence" />
|
||||
</struct>
|
||||
</xsl:if>
|
||||
<constant type="number" name="{xcb:xcb-prefix($req/@name)}" value="{$req/@opcode}" />
|
||||
<struct name="{xcb:xcb-prefix(@name)}_request_t">
|
||||
<field type="uint8_t" name="major_opcode" no-assign="true" />
|
||||
<xsl:if test="$ext">
|
||||
|
|
Loading…
Reference in New Issue