const void* wxDataObject::GetSizeFromBuffer( const void* buffer, size_t* size,
const wxDataFormat& format )
{
- SIZE_T realsz = ::HeapSize(::GetProcessHeap(), 0, buffer);
- if ( realsz == (SIZE_T)-1 )
+ // hack: the third parameter is declared non-const in Wine's headers so
+ // cast away the const
+ size_t realsz = ::HeapSize(::GetProcessHeap(), 0,
+ wx_const_cast(void*, buffer));
+ if ( realsz == (size_t)-1 )
{
// note that HeapSize() does not set last error
wxLogApiError(wxT("HeapSize"), 0);
-wxURLDataObject::wxURLDataObject()
+wxURLDataObject::wxURLDataObject(const wxString& url)
{
// we support CF_TEXT and CFSTR_SHELLURL formats which are basicly the same
// but it seems that some browsers only provide one of them so we have to
// we don't have any data yet
m_dataObjectLast = NULL;
+
+ if ( !url.empty() )
+ SetURL(url);
}
bool wxURLDataObject::SetData(const wxDataFormat& format,