VirtualBox

Ignore:
Timestamp:
Jul 8, 2020 7:33:26 PM (5 years ago)
Author:
vboxsync
Message:

iprt/cdefs.h: Refactored the typedef use of DECLCALLBACK as well as DECLCALLBACKMEMBER to wrap the whole expression, similar to the DECLR?CALLBACKMEMBER macros. This allows adding a throw() at the end when compiling with the VC++ compiler to indicate that the callbacks won't throw anything, so we can stop supressing the C5039 warning about passing functions that can potential throw C++ exceptions to extern C code that can't necessarily cope with such (unwind,++). Introduced a few _EX variations that allows specifying different/no calling convention too, as that's handy when dynamically resolving host APIs. Fixed numerous places missing DECLCALLBACK and such. Left two angry @todos regarding use of CreateThread. bugref:9794

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/zip/zip.cpp

    r82968 r85121  
    132132     * @copydoc RTZipCompress
    133133     */
    134     DECLCALLBACKMEMBER(int, pfnCompress)(PRTZIPCOMP pZip, const void *pvBuf, size_t cbBuf);
     134    DECLCALLBACKMEMBER(int, pfnCompress,(PRTZIPCOMP pZip, const void *pvBuf, size_t cbBuf));
    135135
    136136    /**
    137137     * @copydoc RTZipCompFinish
    138138     */
    139     DECLCALLBACKMEMBER(int, pfnFinish)(PRTZIPCOMP pZip);
     139    DECLCALLBACKMEMBER(int, pfnFinish,(PRTZIPCOMP pZip));
    140140
    141141    /**
    142142     * @copydoc RTZipCompDestroy
    143143     */
    144     DECLCALLBACKMEMBER(int, pfnDestroy)(PRTZIPCOMP pZip);
     144    DECLCALLBACKMEMBER(int, pfnDestroy,(PRTZIPCOMP pZip));
    145145
    146146    /** Compression type. */
     
    200200     * @copydoc RTZipDecompress
    201201     */
    202     DECLCALLBACKMEMBER(int, pfnDecompress)(PRTZIPDECOMP pZip, void *pvBuf, size_t cbBuf, size_t *pcbWritten);
     202    DECLCALLBACKMEMBER(int, pfnDecompress,(PRTZIPDECOMP pZip, void *pvBuf, size_t cbBuf, size_t *pcbWritten));
    203203
    204204    /**
    205205     * @copydoc RTZipDecompDestroy
    206206     */
    207     DECLCALLBACKMEMBER(int, pfnDestroy)(PRTZIPDECOMP pZip);
     207    DECLCALLBACKMEMBER(int, pfnDestroy,(PRTZIPDECOMP pZip));
    208208
    209209    /** Compression type. */
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