summaryrefslogtreecommitdiff
path: root/src/c-client.xsl
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2006-03-02 23:39:38 -0800
committerJamey Sharp <jamey@minilop.net>2006-03-02 23:39:38 -0800
commit622b599c8fcf5d677f76ca03f3241a23dba58712 (patch)
treec649c9dc5490e7b22e27aaf82f49afeb8e6999c6 /src/c-client.xsl
parent87905f0579e749ac6d92843780af246160318eca (diff)
Tweak to previous API change: Require that spare iovecs fall before vector[0]. Leave vector in well-defined state.
Diffstat (limited to 'src/c-client.xsl')
-rw-r--r--src/c-client.xsl18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/c-client.xsl b/src/c-client.xsl
index 568e46c..1e37ea9 100644
--- a/src/c-client.xsl
+++ b/src/c-client.xsl
@@ -596,30 +596,30 @@ authorization from the authors.
mode="assign" />
<l />
- <l>xcb_parts[0].iov_base = &amp;xcb_out;</l>
- <l>xcb_parts[0].iov_len = sizeof(xcb_out);</l>
- <l>xcb_parts[1].iov_base = 0;</l>
- <l>xcb_parts[1].iov_len = -xcb_parts[0].iov_len &amp; 3;</l>
+ <l>xcb_parts[2].iov_base = &amp;xcb_out;</l>
+ <l>xcb_parts[2].iov_len = sizeof(xcb_out);</l>
+ <l>xcb_parts[3].iov_base = 0;</l>
+ <l>xcb_parts[3].iov_len = -xcb_parts[2].iov_len &amp; 3;</l>
<xsl:for-each select="$struct/list">
- <l>xcb_parts[<xsl:value-of select="position() * 2"/>].iov_base = (void *) <!--
+ <l>xcb_parts[<xsl:value-of select="2 + position() * 2"/>].iov_base = (void *) <!--
--><xsl:value-of select="@name" />;</l>
- <l>xcb_parts[<xsl:value-of select="position() * 2"/>].iov_len = <!--
+ <l>xcb_parts[<xsl:value-of select="2 + position() * 2"/>].iov_len = <!--
--><xsl:apply-templates mode="output-expression" /><!--
--><xsl:if test="not(@type = 'void')">
<xsl:text> * sizeof(</xsl:text>
<xsl:value-of select="@type" />
<xsl:text>)</xsl:text>
</xsl:if>;</l>
- <l>xcb_parts[<xsl:value-of select="1 + position() * 2"/>].iov_base = 0;</l>
- <l>xcb_parts[<xsl:value-of select="1 + position() * 2"/>].iov_len = -xcb_parts[<xsl:value-of select="position() * 2"/>].iov_len &amp; 3;</l>
+ <l>xcb_parts[<xsl:value-of select="3 + position() * 2"/>].iov_base = 0;</l>
+ <l>xcb_parts[<xsl:value-of select="3 + position() * 2"/>].iov_len = -xcb_parts[<xsl:value-of select="2 + position() * 2"/>].iov_len &amp; 3;</l>
</xsl:for-each>
<l>XCBSendRequest(c, &amp;xcb_ret.sequence, <!--
--><xsl:choose>
<xsl:when test="@has-reply">XCB_REQUEST_CHECKED</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
- </xsl:choose>, xcb_parts, &amp;xcb_req);</l>
+ </xsl:choose>, xcb_parts + 2, &amp;xcb_req);</l>
<l>return xcb_ret;</l>
</xsl:template>