VirtualBox

Changeset 57432 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Aug 18, 2015 2:57:46 PM (9 years ago)
Author:
vboxsync
Message:

iprt/cdefs.h,*: Split RT_NO_THROW into prototype and definition macros named RT_NO_THROW_PROTO and RT_NO_THROW_DEF respecitively.

Location:
trunk/include/iprt
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/cdefs.h

    r57430 r57432  
    877877#endif
    878878
    879 /** @def RT_NO_THROW
     879/** @def RT_NO_THROW_PROTO
    880880 * How to express that a function doesn't throw C++ exceptions
    881881 * and the compiler can thus save itself the bother of trying
     
    883883 * and the semicolon in function prototypes (and implementation if C++).
    884884 *
     885 * @remarks May not work on C++ methods, mainly intented for C-style APIs.
     886 *
    885887 * @remarks The use of the nothrow attribute with GCC is because old compilers
    886888 *          (4.1.1, 32-bit) leaking the nothrow into global space or something
    887  *          when used with RTDECL or similar.
     889 *          when used with RTDECL or similar.  Using this forces use to have two
     890 *          macros, as the nothrow attribute is not for the function definition.
    888891 */
    889892#ifdef RT_EXCEPTIONS_ENABLED
    890893# ifdef __GNUC__
    891 #  define RT_NO_THROW           __attribute__((nothrow))
     894#  define RT_NO_THROW_PROTO     __attribute__((__nothrow__))
    892895# else
    893 #  define RT_NO_THROW           throw()
    894 # endif
    895 #else
    896 # define RT_NO_THROW
     896#  define RT_NO_THROW_PROTO     throw()
     897# endif
     898#else
     899# define RT_NO_THROW_PROO
     900#endif
     901
     902/** @def RT_NO_THROW_DEF
     903 * The counter part to RT_NO_THROW_PROTO that is added to the function
     904 * definition.
     905 */
     906#if defined(RT_EXCEPTIONS_ENABLED) && !defined(__GNUC__)
     907# define RT_NO_THROW_DEF        RT_NO_THROW_PROTO
     908#else
     909# define RT_NO_THROW_DEF
    897910#endif
    898911
  • trunk/include/iprt/mem.h

    r56291 r57432  
    103103 * @param   pszTag  Allocation tag used for statistics and such.
    104104 */
    105 RTDECL(void *)  RTMemTmpAllocTag(size_t cb, const char *pszTag) RT_NO_THROW;
     105RTDECL(void *)  RTMemTmpAllocTag(size_t cb, const char *pszTag) RT_NO_THROW_PROTO;
    106106
    107107/**
     
    126126 * @param   pszTag  Allocation tag used for statistics and such.
    127127 */
    128 RTDECL(void *)  RTMemTmpAllocZTag(size_t cb, const char *pszTag) RT_NO_THROW;
     128RTDECL(void *)  RTMemTmpAllocZTag(size_t cb, const char *pszTag) RT_NO_THROW_PROTO;
    129129
    130130/**
     
    133133 * @param   pv      Pointer to memory block.
    134134 */
    135 RTDECL(void)    RTMemTmpFree(void *pv) RT_NO_THROW;
     135RTDECL(void)    RTMemTmpFree(void *pv) RT_NO_THROW_PROTO;
    136136
    137137/** @}  */
     
    156156 * @param   pszTag  Allocation tag used for statistics and such.
    157157 */
    158 RTDECL(void *)  RTMemAllocTag(size_t cb, const char *pszTag) RT_NO_THROW;
     158RTDECL(void *)  RTMemAllocTag(size_t cb, const char *pszTag) RT_NO_THROW_PROTO;
    159159
    160160/**
     
    183183 * @param   pszTag  Allocation tag used for statistics and such.
    184184 */
    185 RTDECL(void *)  RTMemAllocZTag(size_t cb, const char *pszTag) RT_NO_THROW;
     185RTDECL(void *)  RTMemAllocZTag(size_t cb, const char *pszTag) RT_NO_THROW_PROTO;
    186186
    187187/**
     
    202202 * @param   pszTag              Allocation tag used for statistics and such.
    203203 */
    204 RTDECL(void *) RTMemAllocVarTag(size_t cbUnaligned, const char *pszTag) RT_NO_THROW;
     204RTDECL(void *) RTMemAllocVarTag(size_t cbUnaligned, const char *pszTag) RT_NO_THROW_PROTO;
    205205
    206206/**
     
    221221 * @param   pszTag              Allocation tag used for statistics and such.
    222222 */
    223 RTDECL(void *) RTMemAllocZVarTag(size_t cbUnaligned, const char *pszTag) RT_NO_THROW;
     223RTDECL(void *) RTMemAllocZVarTag(size_t cbUnaligned, const char *pszTag) RT_NO_THROW_PROTO;
    224224
    225225/**
     
    242242 * @param   pszTag  Allocation tag used for statistics and such.
    243243 */
    244 RTDECL(void *) RTMemDupTag(const void *pvSrc, size_t cb, const char *pszTag) RT_NO_THROW;
     244RTDECL(void *) RTMemDupTag(const void *pvSrc, size_t cb, const char *pszTag) RT_NO_THROW_PROTO;
    245245
    246246/**
     
    267267 * @param   pszTag  Allocation tag used for statistics and such.
    268268 */
    269 RTDECL(void *) RTMemDupExTag(const void *pvSrc, size_t cbSrc, size_t cbExtra, const char *pszTag) RT_NO_THROW;
     269RTDECL(void *) RTMemDupExTag(const void *pvSrc, size_t cbSrc, size_t cbExtra, const char *pszTag) RT_NO_THROW_PROTO;
    270270
    271271/**
     
    288288 * @param   pszTag  Allocation tag used for statistics and such.
    289289 */
    290 RTDECL(void *)  RTMemReallocTag(void *pvOld, size_t cbNew, const char *pszTag) RT_NO_THROW;
     290RTDECL(void *)  RTMemReallocTag(void *pvOld, size_t cbNew, const char *pszTag) RT_NO_THROW_PROTO;
    291291
    292292/**
     
    295295 * @param   pv      Pointer to memory block.
    296296 */
    297 RTDECL(void)    RTMemFree(void *pv) RT_NO_THROW;
     297RTDECL(void)    RTMemFree(void *pv) RT_NO_THROW_PROTO;
    298298
    299299
     
    362362 * @param   ppv                 Where to return the memory.
    363363 */
    364 RTDECL(int) RTMemAllocExTag(size_t cb, size_t cbAlignment, uint32_t fFlags, const char *pszTag, void **ppv) RT_NO_THROW;
     364RTDECL(int) RTMemAllocExTag(size_t cb, size_t cbAlignment, uint32_t fFlags, const char *pszTag, void **ppv) RT_NO_THROW_PROTO;
    365365
    366366/**
     
    375375 *                              RTMEMALLOCEX_FLAGS_EXEC if used.
    376376 */
    377 RTDECL(void) RTMemFreeEx(void *pv, size_t cb) RT_NO_THROW;
     377RTDECL(void) RTMemFreeEx(void *pv, size_t cb) RT_NO_THROW_PROTO;
    378378
    379379
     
    396396 * @param   pszTag  Allocation tag used for statistics and such.
    397397 */
    398 RTDECL(void *)  RTMemExecAllocTag(size_t cb, const char *pszTag) RT_NO_THROW;
     398RTDECL(void *)  RTMemExecAllocTag(size_t cb, const char *pszTag) RT_NO_THROW_PROTO;
    399399
    400400/**
     
    404404 * @param   cb      The allocation size.
    405405 */
    406 RTDECL(void)    RTMemExecFree(void *pv, size_t cb) RT_NO_THROW;
     406RTDECL(void)    RTMemExecFree(void *pv, size_t cb) RT_NO_THROW_PROTO;
    407407
    408408#if defined(IN_RING0) && defined(RT_ARCH_AMD64) && defined(RT_OS_LINUX)
     
    422422 * @param   cb          The size of the memory block.
    423423 */
    424 RTR0DECL(int) RTR0MemExecDonate(void *pvMemory, size_t cb) RT_NO_THROW;
     424RTR0DECL(int) RTR0MemExecDonate(void *pvMemory, size_t cb) RT_NO_THROW_PROTO;
    425425#endif /* R0+AMD64+LINUX */
    426426
     
    442442 * @param   pszTag  Allocation tag used for statistics and such.
    443443 */
    444 RTDECL(void *) RTMemPageAllocTag(size_t cb, const char *pszTag) RT_NO_THROW;
     444RTDECL(void *) RTMemPageAllocTag(size_t cb, const char *pszTag) RT_NO_THROW_PROTO;
    445445
    446446/**
     
    461461 * @param   pszTag  Allocation tag used for statistics and such.
    462462 */
    463 RTDECL(void *) RTMemPageAllocZTag(size_t cb, const char *pszTag) RT_NO_THROW;
     463RTDECL(void *) RTMemPageAllocZTag(size_t cb, const char *pszTag) RT_NO_THROW_PROTO;
    464464
    465465/**
     
    471471 *                  Ignored if @a pv is NULL.
    472472 */
    473 RTDECL(void) RTMemPageFree(void *pv, size_t cb) RT_NO_THROW;
     473RTDECL(void) RTMemPageFree(void *pv, size_t cb) RT_NO_THROW_PROTO;
    474474
    475475/** Page level protection flags for RTMemProtect().
     
    494494 * @param   fProtect    The new protection, a combination of the RTMEM_PROT_* defines.
    495495 */
    496 RTDECL(int) RTMemProtect(void *pv, size_t cb, unsigned fProtect) RT_NO_THROW;
     496RTDECL(int) RTMemProtect(void *pv, size_t cb, unsigned fProtect) RT_NO_THROW_PROTO;
    497497
    498498/**
     
    504504 * @param   cMinPasses  The minimum number of passes to make.
    505505 */
    506 RTDECL(void) RTMemWipeThoroughly(void *pv, size_t cb, size_t cMinPasses) RT_NO_THROW;
     506RTDECL(void) RTMemWipeThoroughly(void *pv, size_t cb, size_t cMinPasses) RT_NO_THROW_PROTO;
    507507
    508508#ifdef IN_RING0
     
    517517 *                  rounded up to PAGE_SIZE.
    518518 */
    519 RTR0DECL(void *) RTMemContAlloc(PRTCCPHYS pPhys, size_t cb) RT_NO_THROW;
     519RTR0DECL(void *) RTMemContAlloc(PRTCCPHYS pPhys, size_t cb) RT_NO_THROW_PROTO;
    520520
    521521/**
     
    525525 * @param   cb      The cb parameter passed to RTMemContAlloc().
    526526 */
    527 RTR0DECL(void) RTMemContFree(void *pv, size_t cb) RT_NO_THROW;
     527RTR0DECL(void) RTMemContFree(void *pv, size_t cb) RT_NO_THROW_PROTO;
    528528
    529529/**
     
    637637 * @param   pszTag  Allocation tag used for statistics and such.
    638638 */
    639 RTDECL(void *)  RTMemEfTmpAlloc(size_t cb, const char *pszTag, RT_SRC_POS_DECL) RT_NO_THROW;
     639RTDECL(void *)  RTMemEfTmpAlloc(size_t cb, const char *pszTag, RT_SRC_POS_DECL) RT_NO_THROW_PROTO;
    640640
    641641/**
     
    647647 * @param   pszTag  Allocation tag used for statistics and such.
    648648 */
    649 RTDECL(void *)  RTMemEfTmpAllocZ(size_t cb, const char *pszTag, RT_SRC_POS_DECL) RT_NO_THROW;
     649RTDECL(void *)  RTMemEfTmpAllocZ(size_t cb, const char *pszTag, RT_SRC_POS_DECL) RT_NO_THROW_PROTO;
    650650
    651651/**
     
    654654 * @param   pv      Pointer to memory block.
    655655 */
    656 RTDECL(void)    RTMemEfTmpFree(void *pv, RT_SRC_POS_DECL) RT_NO_THROW;
     656RTDECL(void)    RTMemEfTmpFree(void *pv, RT_SRC_POS_DECL) RT_NO_THROW_PROTO;
    657657
    658658/**
     
    664664 * @param   pszTag  Allocation tag used for statistics and such.
    665665 */
    666 RTDECL(void *)  RTMemEfAlloc(size_t cb, const char *pszTag, RT_SRC_POS_DECL) RT_NO_THROW;
     666RTDECL(void *)  RTMemEfAlloc(size_t cb, const char *pszTag, RT_SRC_POS_DECL) RT_NO_THROW_PROTO;
    667667
    668668/**
     
    674674 * @param   pszTag  Allocation tag used for statistics and such.
    675675 */
    676 RTDECL(void *)  RTMemEfAllocZ(size_t cb, const char *pszTag, RT_SRC_POS_DECL) RT_NO_THROW;
     676RTDECL(void *)  RTMemEfAllocZ(size_t cb, const char *pszTag, RT_SRC_POS_DECL) RT_NO_THROW_PROTO;
    677677
    678678/**
     
    684684 * @param   pszTag  Allocation tag used for statistics and such.
    685685 */
    686 RTDECL(void *)  RTMemEfAllocVar(size_t cbUnaligned, const char *pszTag, RT_SRC_POS_DECL) RT_NO_THROW;
     686RTDECL(void *)  RTMemEfAllocVar(size_t cbUnaligned, const char *pszTag, RT_SRC_POS_DECL) RT_NO_THROW_PROTO;
    687687
    688688/**
     
    694694 * @param   pszTag  Allocation tag used for statistics and such.
    695695 */
    696 RTDECL(void *)  RTMemEfAllocZVar(size_t cbUnaligned, const char *pszTag, RT_SRC_POS_DECL) RT_NO_THROW;
     696RTDECL(void *)  RTMemEfAllocZVar(size_t cbUnaligned, const char *pszTag, RT_SRC_POS_DECL) RT_NO_THROW_PROTO;
    697697
    698698/**
     
    705705 * @param   pszTag  Allocation tag used for statistics and such.
    706706 */
    707 RTDECL(void *)  RTMemEfRealloc(void *pvOld, size_t cbNew, const char *pszTag, RT_SRC_POS_DECL) RT_NO_THROW;
     707RTDECL(void *)  RTMemEfRealloc(void *pvOld, size_t cbNew, const char *pszTag, RT_SRC_POS_DECL) RT_NO_THROW_PROTO;
    708708
    709709/**
     
    712712 * @param   pv      Pointer to memory block.
    713713 */
    714 RTDECL(void)    RTMemEfFree(void *pv, RT_SRC_POS_DECL) RT_NO_THROW;
     714RTDECL(void)    RTMemEfFree(void *pv, RT_SRC_POS_DECL) RT_NO_THROW_PROTO;
    715715
    716716/**
     
    723723 * @param   pszTag  Allocation tag used for statistics and such.
    724724 */
    725 RTDECL(void *) RTMemEfDup(const void *pvSrc, size_t cb, const char *pszTag, RT_SRC_POS_DECL) RT_NO_THROW;
     725RTDECL(void *) RTMemEfDup(const void *pvSrc, size_t cb, const char *pszTag, RT_SRC_POS_DECL) RT_NO_THROW_PROTO;
    726726
    727727/**
     
    735735 * @param   pszTag  Allocation tag used for statistics and such.
    736736 */
    737 RTDECL(void *) RTMemEfDupEx(const void *pvSrc, size_t cbSrc, size_t cbExtra, const char *pszTag, RT_SRC_POS_DECL) RT_NO_THROW;
     737RTDECL(void *) RTMemEfDupEx(const void *pvSrc, size_t cbSrc, size_t cbExtra, const char *pszTag, RT_SRC_POS_DECL) RT_NO_THROW_PROTO;
    738738
    739739/** @def RTMEM_WRAP_SOME_NEW_AND_DELETE_TO_EF
     
    756756            throw std::bad_alloc(); \
    757757        } \
    758         void *operator new(size_t cb, const std::nothrow_t &nothrow_constant) RT_NO_THROW \
     758        void *operator new(size_t cb, const std::nothrow_t &nothrow_constant) RT_NO_THROW_DEF \
    759759        { \
    760760            NOREF(nothrow_constant); \
     
    768768            throw std::bad_alloc(); \
    769769        } \
    770         void *operator new[](size_t cb, const std::nothrow_t &nothrow_constant) RT_NO_THROW \
     770        void *operator new[](size_t cb, const std::nothrow_t &nothrow_constant) RT_NO_THROW_DEF \
    771771        { \
    772772            NOREF(nothrow_constant); \
     
    774774        } \
    775775        \
    776         void operator delete(void *pv) RT_NO_THROW \
     776        void operator delete(void *pv) RT_NO_THROW_DEF \
    777777        { \
    778778            RTMemEfFree(pv, RT_SRC_POS); \
    779779        } \
    780         void operator delete(void *pv, const std::nothrow_t &nothrow_constant) RT_NO_THROW \
     780        void operator delete(void *pv, const std::nothrow_t &nothrow_constant) RT_NO_THROW_DEF \
    781781        { \
    782782            NOREF(nothrow_constant); \
    783783            RTMemEfFree(pv, RT_SRC_POS); \
    784784        } \
    785         void operator delete[](void *pv) RT_NO_THROW \
     785        void operator delete[](void *pv) RT_NO_THROW_DEF \
    786786        { \
    787787            RTMemEfFree(pv, RT_SRC_POS); \
    788788        } \
    789         void operator delete[](void *pv, const std::nothrow_t &nothrow_constant) RT_NO_THROW \
     789        void operator delete[](void *pv, const std::nothrow_t &nothrow_constant) RT_NO_THROW_DEF \
    790790        { \
    791791            NOREF(nothrow_constant); \
     
    868868 * @copydoc RTMemTmpAllocTag
    869869 */
    870 RTDECL(void *)  RTMemEfTmpAllocNP(size_t cb, const char *pszTag) RT_NO_THROW;
     870RTDECL(void *)  RTMemEfTmpAllocNP(size_t cb, const char *pszTag) RT_NO_THROW_PROTO;
    871871
    872872/**
     
    874874 * @copydoc RTMemTmpAllocZTag
    875875 */
    876 RTDECL(void *)  RTMemEfTmpAllocZNP(size_t cb, const char *pszTag) RT_NO_THROW;
     876RTDECL(void *)  RTMemEfTmpAllocZNP(size_t cb, const char *pszTag) RT_NO_THROW_PROTO;
    877877
    878878/**
     
    880880 * @copydoc RTMemTmpFreeTag
    881881 */
    882 RTDECL(void)    RTMemEfTmpFreeNP(void *pv) RT_NO_THROW;
     882RTDECL(void)    RTMemEfTmpFreeNP(void *pv) RT_NO_THROW_PROTO;
    883883
    884884/**
     
    886886 * @copydoc RTMemAllocTag
    887887 */
    888 RTDECL(void *)  RTMemEfAllocNP(size_t cb, const char *pszTag) RT_NO_THROW;
     888RTDECL(void *)  RTMemEfAllocNP(size_t cb, const char *pszTag) RT_NO_THROW_PROTO;
    889889
    890890/**
     
    892892 * @copydoc RTMemAllocZTag
    893893 */
    894 RTDECL(void *)  RTMemEfAllocZNP(size_t cb, const char *pszTag) RT_NO_THROW;
     894RTDECL(void *)  RTMemEfAllocZNP(size_t cb, const char *pszTag) RT_NO_THROW_PROTO;
    895895
    896896/**
     
    898898 * @copydoc RTMemAllocVarTag
    899899 */
    900 RTDECL(void *)  RTMemEfAllocVarNP(size_t cbUnaligned, const char *pszTag) RT_NO_THROW;
     900RTDECL(void *)  RTMemEfAllocVarNP(size_t cbUnaligned, const char *pszTag) RT_NO_THROW_PROTO;
    901901
    902902/**
     
    904904 * @copydoc RTMemAllocZVarTag
    905905 */
    906 RTDECL(void *)  RTMemEfAllocZVarNP(size_t cbUnaligned, const char *pszTag) RT_NO_THROW;
     906RTDECL(void *)  RTMemEfAllocZVarNP(size_t cbUnaligned, const char *pszTag) RT_NO_THROW_PROTO;
    907907
    908908/**
     
    910910 * @copydoc RTMemReallocTag
    911911 */
    912 RTDECL(void *)  RTMemEfReallocNP(void *pvOld, size_t cbNew, const char *pszTag) RT_NO_THROW;
     912RTDECL(void *)  RTMemEfReallocNP(void *pvOld, size_t cbNew, const char *pszTag) RT_NO_THROW_PROTO;
    913913
    914914/**
     
    916916 * @copydoc RTMemFree
    917917 */
    918 RTDECL(void)    RTMemEfFreeNP(void *pv) RT_NO_THROW;
     918RTDECL(void)    RTMemEfFreeNP(void *pv) RT_NO_THROW_PROTO;
    919919
    920920/**
     
    922922 * @copydoc RTMemDupExTag
    923923 */
    924 RTDECL(void *) RTMemEfDupNP(const void *pvSrc, size_t cb, const char *pszTag) RT_NO_THROW;
     924RTDECL(void *) RTMemEfDupNP(const void *pvSrc, size_t cb, const char *pszTag) RT_NO_THROW_PROTO;
    925925
    926926/**
     
    928928 * @copydoc RTMemDupExTag
    929929 */
    930 RTDECL(void *) RTMemEfDupExNP(const void *pvSrc, size_t cbSrc, size_t cbExtra, const char *pszTag) RT_NO_THROW;
     930RTDECL(void *) RTMemEfDupExNP(const void *pvSrc, size_t cbSrc, size_t cbExtra, const char *pszTag) RT_NO_THROW_PROTO;
    931931
    932932/** @} */
  • trunk/include/iprt/mempool.h

    r56291 r57432  
    6262 * @param   cb              Size in bytes of the memory block to allocated.
    6363 */
    64 RTDECL(void *) RTMemPoolAlloc(RTMEMPOOL hMemPool, size_t cb) RT_NO_THROW;
     64RTDECL(void *) RTMemPoolAlloc(RTMEMPOOL hMemPool, size_t cb) RT_NO_THROW_PROTO;
    6565
    6666/**
     
    7777 * @param   cb              Size in bytes of the memory block to allocated.
    7878 */
    79 RTDECL(void *) RTMemPoolAllocZ(RTMEMPOOL hMemPool, size_t cb) RT_NO_THROW;
     79RTDECL(void *) RTMemPoolAllocZ(RTMEMPOOL hMemPool, size_t cb) RT_NO_THROW_PROTO;
    8080
    8181/**
     
    8989 * @param   cb              The amount of memory to duplicate.
    9090 */
    91 RTDECL(void *) RTMemPoolDup(RTMEMPOOL hMemPool, const void *pvSrc, size_t cb) RT_NO_THROW;
     91RTDECL(void *) RTMemPoolDup(RTMEMPOOL hMemPool, const void *pvSrc, size_t cb) RT_NO_THROW_PROTO;
    9292
    9393/**
     
    103103 * @param   cbExtra         The amount of extra memory to allocate and zero.
    104104 */
    105 RTDECL(void *) RTMemPoolDupEx(RTMEMPOOL hMemPool, const void *pvSrc, size_t cbSrc, size_t cbExtra) RT_NO_THROW;
     105RTDECL(void *) RTMemPoolDupEx(RTMEMPOOL hMemPool, const void *pvSrc, size_t cbSrc, size_t cbExtra) RT_NO_THROW_PROTO;
    106106
    107107/**
     
    115115 * @param   cbNew           The new block size (in bytes).
    116116 */
    117 RTDECL(void *) RTMemPoolRealloc(RTMEMPOOL hMemPool, void *pvOld, size_t cbNew) RT_NO_THROW;
     117RTDECL(void *) RTMemPoolRealloc(RTMEMPOOL hMemPool, void *pvOld, size_t cbNew) RT_NO_THROW_PROTO;
    118118
    119119/**
     
    128128 *          function to simplify code migration.
    129129 */
    130 RTDECL(void) RTMemPoolFree(RTMEMPOOL hMemPool, void *pv) RT_NO_THROW;
     130RTDECL(void) RTMemPoolFree(RTMEMPOOL hMemPool, void *pv) RT_NO_THROW_PROTO;
    131131
    132132/**
     
    137137 * @param   pv              Pointer to memory block.
    138138 */
    139 RTDECL(uint32_t) RTMemPoolRetain(void *pv) RT_NO_THROW;
     139RTDECL(uint32_t) RTMemPoolRetain(void *pv) RT_NO_THROW_PROTO;
    140140
    141141/**
     
    149149 * @param   pv              Pointer to memory block.
    150150 */
    151 RTDECL(uint32_t) RTMemPoolRelease(RTMEMPOOL hMemPool, void *pv) RT_NO_THROW;
     151RTDECL(uint32_t) RTMemPoolRelease(RTMEMPOOL hMemPool, void *pv) RT_NO_THROW_PROTO;
    152152
    153153/**
     
    157157 * @param   pv              Pointer to memory block.
    158158 */
    159 RTDECL(uint32_t) RTMemPoolRefCount(void *pv) RT_NO_THROW;
     159RTDECL(uint32_t) RTMemPoolRefCount(void *pv) RT_NO_THROW_PROTO;
    160160
    161161
  • trunk/include/iprt/memsafer.h

    r56291 r57432  
    108108 * @param   pszTag      Allocation tag used for statistics and such.
    109109 */
    110 RTDECL(int) RTMemSaferAllocZExTag(void **ppvNew, size_t cb, uint32_t fFlags, const char *pszTag) RT_NO_THROW;
     110RTDECL(int) RTMemSaferAllocZExTag(void **ppvNew, size_t cb, uint32_t fFlags, const char *pszTag) RT_NO_THROW_PROTO;
    111111
    112112/**
     
    134134 * @param   pszTag      Allocation tag used for statistics and such.
    135135 */
    136 RTDECL(void *) RTMemSaferAllocZTag(size_t cb, const char *pszTag) RT_NO_THROW;
     136RTDECL(void *) RTMemSaferAllocZTag(size_t cb, const char *pszTag) RT_NO_THROW_PROTO;
    137137
    138138/**
     
    168168 * @param   pszTag      Allocation tag used for statistics and such.
    169169 */
    170 RTDECL(int) RTMemSaferReallocZExTag(size_t cbOld, void *pvOld, size_t cbNew, void **ppvNew, uint32_t fFlags, const char *pszTag) RT_NO_THROW;
     170RTDECL(int) RTMemSaferReallocZExTag(size_t cbOld, void *pvOld, size_t cbNew, void **ppvNew, uint32_t fFlags, const char *pszTag) RT_NO_THROW_PROTO;
    171171
    172172/**
     
    207207 * @param   pszTag      Allocation tag used for statistics and such.
    208208 */
    209 RTDECL(void *) RTMemSaferReallocZTag(size_t cbOld, void *pvOld, size_t cbNew, const char *pszTag) RT_NO_THROW;
     209RTDECL(void *) RTMemSaferReallocZTag(size_t cbOld, void *pvOld, size_t cbNew, const char *pszTag) RT_NO_THROW_PROTO;
    210210
    211211/**
     
    236236 * @param   cb          The allocation size.
    237237 */
    238 RTDECL(void) RTMemSaferFree(void *pv, size_t cb) RT_NO_THROW;
     238RTDECL(void) RTMemSaferFree(void *pv, size_t cb) RT_NO_THROW_PROTO;
    239239
    240240/** @}  */
  • trunk/include/iprt/rand.h

    r56291 r57432  
    4343 * @param   cb  Number of bytes to generate.
    4444 */
    45 RTDECL(void) RTRandBytes(void *pv, size_t cb) RT_NO_THROW;
     45RTDECL(void) RTRandBytes(void *pv, size_t cb) RT_NO_THROW_PROTO;
    4646
    4747/**
     
    5252 * @param   i32Last     Last number in the set.
    5353 */
    54 RTDECL(int32_t) RTRandS32Ex(int32_t i32First, int32_t i32Last) RT_NO_THROW;
     54RTDECL(int32_t) RTRandS32Ex(int32_t i32First, int32_t i32Last) RT_NO_THROW_PROTO;
    5555
    5656/**
     
    5959 * @returns The random number.
    6060 */
    61 RTDECL(int32_t) RTRandS32(void) RT_NO_THROW;
     61RTDECL(int32_t) RTRandS32(void) RT_NO_THROW_PROTO;
    6262
    6363/**
     
    6868 * @param   u32Last     Last number in the set.
    6969 */
    70 RTDECL(uint32_t) RTRandU32Ex(uint32_t u32First, uint32_t u32Last) RT_NO_THROW;
     70RTDECL(uint32_t) RTRandU32Ex(uint32_t u32First, uint32_t u32Last) RT_NO_THROW_PROTO;
    7171
    7272/**
     
    7575 * @returns The random number.
    7676 */
    77 RTDECL(uint32_t) RTRandU32(void) RT_NO_THROW;
     77RTDECL(uint32_t) RTRandU32(void) RT_NO_THROW_PROTO;
    7878
    7979/**
     
    8484 * @param   i64Last     Last number in the set.
    8585 */
    86 RTDECL(int64_t) RTRandS64Ex(int64_t i64First, int64_t i64Last) RT_NO_THROW;
     86RTDECL(int64_t) RTRandS64Ex(int64_t i64First, int64_t i64Last) RT_NO_THROW_PROTO;
    8787
    8888/**
     
    9191 * @returns The random number.
    9292 */
    93 RTDECL(int64_t) RTRandS64(void) RT_NO_THROW;
     93RTDECL(int64_t) RTRandS64(void) RT_NO_THROW_PROTO;
    9494
    9595/**
     
    100100 * @param   u64Last     Last number in the set.
    101101 */
    102 RTDECL(uint64_t) RTRandU64Ex(uint64_t u64First, uint64_t u64Last) RT_NO_THROW;
     102RTDECL(uint64_t) RTRandU64Ex(uint64_t u64First, uint64_t u64Last) RT_NO_THROW_PROTO;
    103103
    104104/**
     
    107107 * @returns The random number.
    108108 */
    109 RTDECL(uint64_t) RTRandU64(void) RT_NO_THROW;
     109RTDECL(uint64_t) RTRandU64(void) RT_NO_THROW_PROTO;
    110110
    111111
     
    117117 *                      generator.
    118118 */
    119 RTDECL(int) RTRandAdvCreate(PRTRAND phRand) RT_NO_THROW;
     119RTDECL(int) RTRandAdvCreate(PRTRAND phRand) RT_NO_THROW_PROTO;
    120120
    121121/**
     
    125125 * @param   phRand      Where to store the handle to the generator.
    126126 */
    127 RTDECL(int) RTRandAdvCreatePseudo(PRTRAND phRand) RT_NO_THROW;
     127RTDECL(int) RTRandAdvCreatePseudo(PRTRAND phRand) RT_NO_THROW_PROTO;
    128128
    129129/**
     
    133133 * @param   phRand      Where to store the handle to the generator.
    134134 */
    135 RTDECL(int) RTRandAdvCreateParkMiller(PRTRAND phRand) RT_NO_THROW;
     135RTDECL(int) RTRandAdvCreateParkMiller(PRTRAND phRand) RT_NO_THROW_PROTO;
    136136
    137137/**
     
    148148 * @remarks Think /dev/urandom.
    149149 */
    150 RTDECL(int) RTRandAdvCreateSystemFaster(PRTRAND phRand) RT_NO_THROW;
     150RTDECL(int) RTRandAdvCreateSystemFaster(PRTRAND phRand) RT_NO_THROW_PROTO;
    151151
    152152/**
     
    167167 * @remarks Think /dev/random.
    168168 */
    169 RTDECL(int) RTRandAdvCreateSystemTruer(PRTRAND phRand) RT_NO_THROW;
     169RTDECL(int) RTRandAdvCreateSystemTruer(PRTRAND phRand) RT_NO_THROW_PROTO;
    170170
    171171/**
     
    175175 * @param   hRand       Handle to the random number generator.
    176176 */
    177 RTDECL(int) RTRandAdvDestroy(RTRAND hRand) RT_NO_THROW;
     177RTDECL(int) RTRandAdvDestroy(RTRAND hRand) RT_NO_THROW_PROTO;
    178178
    179179/**
     
    190190 * @param   u64Seed     Seed.
    191191 */
    192 RTDECL(int) RTRandAdvSeed(RTRAND hRand, uint64_t u64Seed) RT_NO_THROW;
     192RTDECL(int) RTRandAdvSeed(RTRAND hRand, uint64_t u64Seed) RT_NO_THROW_PROTO;
    193193
    194194/**
     
    212212 *                      terminator, thus the 'cb' instead of 'cch').
    213213 */
    214 RTDECL(int) RTRandAdvSaveState(RTRAND hRand, char *pszState, size_t *pcbState) RT_NO_THROW;
     214RTDECL(int) RTRandAdvSaveState(RTRAND hRand, char *pszState, size_t *pcbState) RT_NO_THROW_PROTO;
    215215
    216216/**
     
    226226 * @param   pszState    The state to load.
    227227 */
    228 RTDECL(int) RTRandAdvRestoreState(RTRAND hRand, char const *pszState) RT_NO_THROW;
     228RTDECL(int) RTRandAdvRestoreState(RTRAND hRand, char const *pszState) RT_NO_THROW_PROTO;
    229229
    230230/**
     
    235235 * @param   cb  Number of bytes to generate.
    236236 */
    237 RTDECL(void) RTRandAdvBytes(RTRAND hRand, void *pv, size_t cb) RT_NO_THROW;
     237RTDECL(void) RTRandAdvBytes(RTRAND hRand, void *pv, size_t cb) RT_NO_THROW_PROTO;
    238238
    239239/**
     
    245245 * @param   i32Last     Last number in the set.
    246246 */
    247 RTDECL(int32_t) RTRandAdvS32Ex(RTRAND hRand, int32_t i32First, int32_t i32Last) RT_NO_THROW;
     247RTDECL(int32_t) RTRandAdvS32Ex(RTRAND hRand, int32_t i32First, int32_t i32Last) RT_NO_THROW_PROTO;
    248248
    249249/**
     
    253253 * @param   hRand       Handle to the random number generator.
    254254 */
    255 RTDECL(int32_t) RTRandAdvS32(RTRAND hRand) RT_NO_THROW;
     255RTDECL(int32_t) RTRandAdvS32(RTRAND hRand) RT_NO_THROW_PROTO;
    256256
    257257/**
     
    263263 * @param   u32Last     Last number in the set.
    264264 */
    265 RTDECL(uint32_t) RTRandAdvU32Ex(RTRAND hRand, uint32_t u32First, uint32_t u32Last) RT_NO_THROW;
     265RTDECL(uint32_t) RTRandAdvU32Ex(RTRAND hRand, uint32_t u32First, uint32_t u32Last) RT_NO_THROW_PROTO;
    266266
    267267/**
     
    271271 * @param   hRand       Handle to the random number generator.
    272272 */
    273 RTDECL(uint32_t) RTRandAdvU32(RTRAND hRand) RT_NO_THROW;
     273RTDECL(uint32_t) RTRandAdvU32(RTRAND hRand) RT_NO_THROW_PROTO;
    274274
    275275/**
     
    281281 * @param   i64Last     Last number in the set.
    282282 */
    283 RTDECL(int64_t) RTRandAdvS64Ex(RTRAND hRand, int64_t i64First, int64_t i64Last) RT_NO_THROW;
     283RTDECL(int64_t) RTRandAdvS64Ex(RTRAND hRand, int64_t i64First, int64_t i64Last) RT_NO_THROW_PROTO;
    284284
    285285/**
     
    288288 * @returns The random number.
    289289 */
    290 RTDECL(int64_t) RTRandAdvS64(RTRAND hRand) RT_NO_THROW;
     290RTDECL(int64_t) RTRandAdvS64(RTRAND hRand) RT_NO_THROW_PROTO;
    291291
    292292/**
     
    298298 * @param   u64Last     Last number in the set.
    299299 */
    300 RTDECL(uint64_t) RTRandAdvU64Ex(RTRAND hRand, uint64_t u64First, uint64_t u64Last) RT_NO_THROW;
     300RTDECL(uint64_t) RTRandAdvU64Ex(RTRAND hRand, uint64_t u64First, uint64_t u64Last) RT_NO_THROW_PROTO;
    301301
    302302/**
     
    306306 * @param   hRand       Handle to the random number generator.
    307307 */
    308 RTDECL(uint64_t) RTRandAdvU64(RTRAND hRand) RT_NO_THROW;
     308RTDECL(uint64_t) RTRandAdvU64(RTRAND hRand) RT_NO_THROW_PROTO;
    309309
    310310
  • trunk/include/iprt/zip.h

    r56291 r57432  
    196196RTDECL(int)     RTZipBlockCompress(RTZIPTYPE enmType, RTZIPLEVEL enmLevel, uint32_t fFlags,
    197197                                   void const *pvSrc, size_t cbSrc,
    198                                    void *pvDst, size_t cbDst, size_t *pcbDstActual) RT_NO_THROW;
     198                                   void *pvDst, size_t cbDst, size_t *pcbDstActual) RT_NO_THROW_PROTO;
    199199
    200200
     
    215215RTDECL(int)     RTZipBlockDecompress(RTZIPTYPE enmType, uint32_t fFlags,
    216216                                     void const *pvSrc, size_t cbSrc, size_t *pcbSrcActual,
    217                                      void *pvDst, size_t cbDst, size_t *pcbDstActual) RT_NO_THROW;
     217                                     void *pvDst, size_t cbDst, size_t *pcbDstActual) RT_NO_THROW_PROTO;
    218218
    219219
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