VirtualBox

vbox的更動 21113 路徑 trunk/src/libs/xpcom18a4/xpcom


忽略:
時間撮記:
2009-7-1 上午11:48:47 (15 年 以前)
作者:
vboxsync
訊息:

xpcom: first go at making xpcom bitness-safe

位置:
trunk/src/libs/xpcom18a4/xpcom
檔案:
修改 4 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/libs/xpcom18a4/xpcom/base/nscore.h

    r11440 r21113  
    431431#endif
    432432 
     433#ifndef VBOX
    433434/*
    434435 * Use these macros to do 64bit safe pointer conversions.
     
    437438#define NS_PTR_TO_INT32(x) ((char *)(x) - (char *)0)
    438439#define NS_INT32_TO_PTR(x) ((void *)((char *)0 + (x)))
     440#else /* VBOX */
     441// This stuff is (contrary to the comment) totally 64bit unsafe, so strip
     442// it down to only do one direction, which is used by the hashing code.
     443#define NS_PTR_TO_INT32(x) ((PRInt32)((char *)(x) - (char *)0))
     444#endif /* VBOX */
    439445
    440446/*
  • trunk/src/libs/xpcom18a4/xpcom/ds/nsCheapSets.h

    r1 r21113  
    8383
    8484private:
    85   typedef unsigned long PtrBits;
     85  typedef PRUint64 PtrBits;
    8686
    8787  /** Get the hash pointer (or null if we're not a hash) */
     
    156156
    157157private:
    158   typedef unsigned long PtrBits;
     158  typedef PRUint64 PtrBits;
    159159
    160160  /** Get the hash pointer (or null if we're not a hash) */
  • trunk/src/libs/xpcom18a4/xpcom/ds/nsVoidArray.h

    r1 r21113  
    376376
    377377private:
    378   typedef unsigned long PtrBits;
     378  typedef PRUint64 PtrBits;
    379379
    380380  PRBool HasSingleChild() const
  • trunk/src/libs/xpcom18a4/xpcom/io/nsFastLoadService.cpp

    r1 r21113  
    395395        return rv;
    396396
     397#ifndef VBOX
    397398    mChecksumTable.Put(&key, NS_INT32_TO_PTR(checksum));
     399#else /* VBOX */
     400    mChecksumTable.Put(&key, (void *)checksum);
     401#endif /* VBOX */
    398402    *aChecksum = checksum;
    399403    return NS_OK;
     
    418422
    419423    nsCStringKey key(path);
     424#ifndef VBOX
    420425    mChecksumTable.Put(&key, NS_INT32_TO_PTR(checksum));
     426#else /* VBOX */
     427    mChecksumTable.Put(&key, (void *)checksum);
     428#endif /* VBOX */
    421429    return NS_OK;
    422430}
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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