VirtualBox

Changeset 61958 in vbox for trunk/src/VBox/Main/idl


Ignore:
Timestamp:
Jun 30, 2016 1:33:44 PM (9 years ago)
Author:
vboxsync
Message:

Main/idl/{m,xp}idl.xsl: need to cast the custom return values (Windows uses a signed type, XPCOM unsigned) for consistent behavior (e.g. when throwing raw error codes without using setError etc.)

Location:
trunk/src/VBox/Main/idl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/midl.xsl

    r59382 r61958  
    169169<xsl:template match="result">
    170170  <xsl:text>cpp_quote("</xsl:text>
    171   <xsl:value-of select="concat('#define ',@name,' ',@value)"/>
     171  <xsl:value-of select="concat('#define ',@name,' ((HRESULT)',@value, ')')"/>
    172172  <xsl:text>")&#x0A;</xsl:text>
    173173</xsl:template>
  • trunk/src/VBox/Main/idl/xpidl.xsl

    r56596 r61958  
    168168-->
    169169<xsl:template match="result">
    170   <xsl:value-of select="concat('#define ',@name,' ',@value)"/>
     170  <xsl:value-of select="concat('#define ',@name,' ((nsresult)',@value, ')')"/>
    171171  <xsl:text>&#x0A;</xsl:text>
    172172</xsl:template>
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette