VirtualBox

儲存庫 vbox 的更動 16432


忽略:
時間撮記:
2009-1-30 下午06:18:20 (16 年 以前)
作者:
vboxsync
訊息:

iprt/cdefs.h: Added RT_UOFFSETOF_ADD and RT_OFFSETOF_ADD to work around g++ static initializers.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/include/iprt/cdefs.h

    r15932 r16432  
    955955 */
    956956#define RT_UOFFSETOF(type, member)   ( (uintptr_t)&( ((type *)(void *)0)->member) )
     957
     958/** @def RT_OFFSETOF_ADD
     959 * RT_OFFSETOF with an addend.
     960 *
     961 * @returns offset into the structure of the specified member. signed.
     962 * @param   type    Structure type.
     963 * @param   member  Member.
     964 * @param   addend  The addend to add to the offset.
     965 */
     966#define RT_OFFSETOF_ADD(type, member, addend)   ( (int)RT_UOFFSETOF_ADD(type, member, addend) )
     967
     968/** @def RT_UOFFSETOF_ADD
     969 * RT_UOFFSETOF with an addend.
     970 *
     971 * @returns offset into the structure of the specified member. signed.
     972 * @param   type    Structure type.
     973 * @param   member  Member.
     974 * @param   addend  The addend to add to the offset.
     975 */
     976#define RT_UOFFSETOF_ADD(type, member, addend)   ( (uintptr_t)&( ((type *)(void *)(uintptr_t)(addend))->member) )
    957977
    958978/** @def RT_SIZEOFMEMB
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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