Do NOT result typedefs during XML transformation.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 02 Jul 2015 09:00:12 +0100
changeset 35 69765ac6008b
parent 34 834ca32d06b2
child 36 4e586238a9f7
Do NOT result typedefs during XML transformation. Let the generator / mappings to decide whether they need to be resolved or not.
resources/styles/gccxml2def-utils.xsl
--- a/resources/styles/gccxml2def-utils.xsl	Sun Dec 28 22:29:51 2014 +0100
+++ b/resources/styles/gccxml2def-utils.xsl	Thu Jul 02 09:00:12 2015 +0100
@@ -43,39 +43,7 @@
       </xsl:when>
 
       <xsl:when test="/GCC_XML/Typedef[@id = $c-type-id]">
-	<xsl:choose>
-	  <!-- Fundamental types are resolved -->
-	  <xsl:when test="/GCC_XML/FundamentalType[@id = /GCC_XML/Typedef[@id = $c-type-id]/@type]" >
-	    <xsl:value-of select="/GCC_XML/FundamentalType[@id = /GCC_XML/Typedef[@id = $c-type-id]/@type]/@name"/>
-	  </xsl:when>
-
-	  <!-- Pointers are resolved -->
-	  <xsl:when test="/GCC_XML/PointerType[@id = /GCC_XML/Typedef[@id = $c-type-id]/@type]" >
-	    <xsl:call-template name="c-type-string">
-	      <xsl:with-param name="c-type-id" select="/GCC_XML/Typedef[@id = $c-type-id]/@type"/>
-	    </xsl:call-template>
-	  </xsl:when>
-
-	  <!-- Typedefs are resolved -->
-	  <xsl:when test="/GCC_XML/Typedef[@id = /GCC_XML/Typedef[@id = $c-type-id]/@type]" >
-	    <xsl:call-template name="c-type-string">
-	      <xsl:with-param name="c-type-id" select="/GCC_XML/Typedef[@id = $c-type-id]/@type"/>
-	    </xsl:call-template>
-	  </xsl:when>
-
-	  <!-- Function types are resolved -->
-	  <xsl:when test="/GCC_XML/FunctionType[@id = /GCC_XML/Typedef[@id = $c-type-id]/@type]">
-	    <xsl:call-template name="c-type-string">
-	      <xsl:with-param name="c-type-id" select="/GCC_XML/Typedef[@id = $c-type-id]/@type"/>
-	      <xsl:with-param name="c-name-id" select="/GCC_XML/Typedef[@id = $c-type-id]/@name"/>
-	    </xsl:call-template>
-	  </xsl:when>
-
-	  <!-- remaining not, possible loop in struct -->
-	  <xsl:otherwise>
-	    <xsl:value-of select="/GCC_XML/Typedef[@id = $c-type-id]/@name"/>
-	  </xsl:otherwise>
-	</xsl:choose>
+        <xsl:value-of select="/GCC_XML/Typedef[@id = $c-type-id]/@name"/>
       </xsl:when>
 
       <xsl:when test="/GCC_XML/FunctionType[@id = $c-type-id]">