From: Vadim Zeitlin Date: Tue, 28 Sep 2004 21:53:19 +0000 (+0000) Subject: wxListItem::m_data is now of type wxUIntPtr, not long, for compatibility with 64... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/0d01dd512f9cd70eac7fd50f387b5143ad5e1ca5 wxListItem::m_data is now of type wxUIntPtr, not long, for compatibility with 64 bit systems git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/changes.txt b/docs/changes.txt index 22f80ef4bb..755f246ace 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -154,6 +154,8 @@ INCOMPATIBLE CHANGES SINCE 2.4.x even on 32 bit platforms, instead of off_t and so the return value of wxFile::Length(), for example, shouldn't be assigned to off_t variable any more (the compiler might warn you about this). +- wxListItem::m_data is now of type wxUIntPtr, not long, for compatibility + with 64 bit systems DEPRECATED METHODS SINCE 2.4.x diff --git a/include/wx/listbase.h b/include/wx/listbase.h index 1f405ac1ff..91ae3af7b5 100644 --- a/include/wx/listbase.h +++ b/include/wx/listbase.h @@ -242,7 +242,7 @@ public: void SetData(long data) { m_mask |= wxLIST_MASK_DATA; m_data = data; } void SetData(void *data) - { m_mask |= wxLIST_MASK_DATA; m_data = (long)data; } + { m_mask |= wxLIST_MASK_DATA; m_data = wxPtrToUInt(data); } void SetWidth(int width) { m_mask |= wxLIST_MASK_WIDTH; m_width = width; } @@ -263,7 +263,7 @@ public: long GetState() const { return m_state & m_stateMask; } const wxString& GetText() const { return m_text; } int GetImage() const { return m_image; } - long GetData() const { return m_data; } + wxUIntPtr GetData() const { return m_data; } int GetWidth() const { return m_width; } wxListColumnFormat GetAlign() const { return (wxListColumnFormat)m_format; } @@ -292,7 +292,7 @@ public: long m_stateMask;// Which flags of m_state are valid (uses same flags) wxString m_text; // The label/header text int m_image; // The zero-based index into an image list - long m_data; // App-defined data + wxUIntPtr m_data; // App-defined data // For columns only int m_format; // left, right, centre