VirtualBox

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


Ignore:
Timestamp:
Jul 13, 2020 12:22:45 AM (4 years ago)
Author:
vboxsync
Message:

Main/comimpl.xsl(VBoxEvents.*): Made the internal setter methods inline and return non-S_OK on allocation failures. bugref:9790

File:
1 edited

Legend:

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

    r85286 r85290  
    213213      </xsl:variable>
    214214      <xsl:value-of select="concat('         SafeArray&lt;', $elemtype, '&gt; aArr(ComSafeArrayInArg(',$param,'));&#10;')"/>
    215       <xsl:value-of select="concat('         ',$member, '.initFrom(aArr);&#10;')"/>
     215      <xsl:value-of select="concat('         return ',$member, '.initFrom(aArr);&#10;')"/>
     216    </xsl:when>
     217    <xsl:when test="($type='wstring') or ($type='uuid')">
     218      <xsl:value-of select="concat('         return ',$member, '.assignEx(', $param, ');&#10;')"/>
    216219    </xsl:when>
    217220    <xsl:otherwise>
    218221      <xsl:value-of select="concat('         ', $member, ' = ', $param, ';&#10;')"/>
     222      <xsl:value-of select="       '         return S_OK;&#10;'" />
    219223    </xsl:otherwise>
    220224  </xsl:choose>
     
    453457        <xsl:with-param name="safearray" select="@safearray" />
    454458      </xsl:call-template>
    455       <xsl:value-of select="       '         return S_OK;&#10;'" />
    456459      <xsl:value-of select="       '    }&#10;'" />
    457460    </xsl:if>
    458461
    459462    <xsl:value-of select="       '    // purely internal setter&#10;'" />
    460     <xsl:value-of select="concat('    HRESULT set_', @name,'(',$pTypeNameIn, ')&#10;    {&#10;')" />
     463    <xsl:value-of select="concat('    inline HRESULT set_', @name,'(',$pTypeNameIn, ')&#10;    {&#10;')" />
    461464    <xsl:call-template name="genSetParam">
    462465      <xsl:with-param name="type" select="@type" />
     
    465468      <xsl:with-param name="safearray" select="@safearray" />
    466469    </xsl:call-template>
    467     <xsl:value-of select="       '         return S_OK;&#10;'" />
    468470    <xsl:value-of select="       '    }&#10;'" />
    469471  </xsl:for-each>
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