VirtualBox

vbox的更動 33977 路徑 trunk/src/libs/xpcom18a4/python


忽略:
時間撮記:
2010-11-11 上午11:42:07 (14 年 以前)
作者:
vboxsync
訊息:

*: replaced a bunch of sprintf() by snprintf()

位置:
trunk/src/libs/xpcom18a4/python/src
檔案:
修改 3 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/libs/xpcom18a4/python/src/PyIID.cpp

    r28953 r33977  
    208208        char buf[256];
    209209        char *sziid = s_iid->m_iid.ToString();
     210#ifdef VBOX
     211        snprintf(buf, sizeof(buf), "_xpcom.IID('%s')", sziid);
     212#else
    210213        sprintf(buf, "_xpcom.IID('%s')", sziid);
     214#endif
    211215        nsMemory::Free(sziid);
    212216        return PyString_FromString(buf);
  • trunk/src/libs/xpcom18a4/python/src/PyISupports.cpp

    r31153 r33977  
    146146{
    147147        char buf[128];
     148#ifdef VBOX
     149        snprintf(buf, sizeof(buf), "%s has read-only attributes", ob_type->tp_name );
     150#else
    148151        sprintf(buf, "%s has read-only attributes", ob_type->tp_name );
     152#endif
    149153        PyErr_SetString(PyExc_TypeError, buf);
    150154        return -1;
  • trunk/src/libs/xpcom18a4/python/src/TypeObject.cpp

    r11746 r33977  
    151151        // XXX - need some sort of buffer overflow.
    152152        char buf[512];
     153#ifdef VBOX
     154        snprintf(buf, sizeof(buf), "<XPCOM object (%s) at 0x%p/0x%p>",
     155                iid_repr, (void *)self, (void *)pis->m_obj.get());
     156#else
    153157        sprintf(buf, "<XPCOM object (%s) at 0x%p/0x%p>",
    154158                iid_repr, (void *)self, (void *)pis->m_obj.get());
     159#endif
    155160        nsMemory::Free(iid_repr);
    156161        return PyString_FromString(buf);
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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