[Xcb-commit] src

Josh Triplett josh at kemper.freedesktop.org
Fri Oct 6 20:10:09 PDT 2006


 src/c-client.xsl |   10 +---------
 1 files changed, 1 insertion(+), 9 deletions(-)

New commits:
diff-tree 90eeb461be4975ff35d187ba64fedbb16ff13d15 (from 9bd2c0c58fbe4c994e76619c2d67e46ed8b43030)
Author: Josh Triplett <josh at freedesktop.org>
Date:   Fri Oct 6 17:44:53 2006 -0700

    Remove XID wrapper structures and replace them with uint32_t typedefs
    
    After positive feedback from several people, we have decided to remove the XID
    wrapper structures that attempted to provide C type safety, and replace them
    with uint32_t typedefs.  Feedback has indicated that these type-safety hacks
    generated more trouble than help.
    
    We will bump the libxcb soname at the next release.

diff --git a/src/c-client.xsl b/src/c-client.xsl
index 982ec02..4a7b50e 100644
--- a/src/c-client.xsl
+++ b/src/c-client.xsl
@@ -404,17 +404,9 @@ authorization from the authors.
   </xsl:template>
 
   <xsl:template match="xidtype" mode="pass1">
-    <struct name="{xcb:xcb-prefix(@name)}_t">
-      <field type="uint32_t" name="xid" />
-    </struct>
+    <typedef oldname="uint32_t" newname="{xcb:xcb-prefix(@name)}_t" />
     <iterator ref="{xcb:xcb-prefix(@name)}" />
     <iterator-functions ref="{xcb:xcb-prefix(@name)}" />
-    <function type="{xcb:xcb-prefix(@name)}_t" name="{xcb:xcb-prefix(@name)}_new">
-      <field type="xcb_connection_t *" name="c" />
-      <l><xsl:value-of select="concat(xcb:xcb-prefix(@name), '_t')" /> ret;</l>
-      <l>ret.xid = xcb_generate_id(c);</l>
-      <l>return ret;</l>
-    </function>
   </xsl:template>
 
   <xsl:template match="struct|union" mode="pass1">


More information about the xcb-commit mailing list