Alien-wxWidgets

 view release on metacpan or  search on metacpan

patches/wxMSW-2.8.10-w64.patch  view on Meta::CPAN

@@ -700,13 +690,13 @@
     if (pd->hDevNames)
         GlobalFree(pd->hDevNames);
 
-    pd->hDevMode = (HGLOBAL)(DWORD) native_data->GetDevMode();
+    pd->hDevMode = (HGLOBAL) native_data->GetDevMode();
     native_data->SetDevMode( (void*) NULL);
 
     // Shouldn't assert; we should be able to test Ok-ness at a higher level
     //wxASSERT_MSG( (pd->hDevMode), wxT("hDevMode must be non-NULL in ConvertToNative!"));
 
-    pd->hDevNames = (HGLOBAL)(DWORD) native_data->GetDevNames();
+    pd->hDevNames = (HGLOBAL) native_data->GetDevNames();
     native_data->SetDevNames( (void*) NULL);
 
 
@@ -719,11 +709,7 @@
 
     pd->Flags = PD_RETURNDC;
 
-#ifdef __GNUWIN32__
-    pd->lStructSize = 66;
-#else
     pd->lStructSize = sizeof( PRINTDLG );
-#endif
 
     pd->hwndOwner=(HWND)NULL;
 //    pd->hDevNames=(HANDLE)NULL;
@@ -777,9 +763,9 @@
         if (native_data->GetDevMode())
         {
             // Make sure we don't leak memory
-            GlobalFree( (HGLOBAL)(DWORD) native_data->GetDevMode() );
+            GlobalFree( (HGLOBAL) native_data->GetDevMode() );
         }
-        native_data->SetDevMode( (void*)(long) pd->hDevMode );
+        native_data->SetDevMode( pd->hDevMode );
         pd->hDevMode = NULL;
     }
 
@@ -789,9 +775,9 @@
         if (native_data->GetDevNames())
         {
             // Make sure we don't leak memory
-            GlobalFree((HGLOBAL)(DWORD) native_data->GetDevNames());
+            GlobalFree((HGLOBAL) native_data->GetDevNames());
         }
-        native_data->SetDevNames((void*)(long) pd->hDevNames);
+        native_data->SetDevNames(pd->hDevNames);
         pd->hDevNames = NULL;
     }

Index: src/msw/textctrl.cpp
===================================================================
--- src/msw/textctrl.cpp	2009-03-06 13:11:24.000000000 +0100
+++ src/msw/textctrl.cpp	2010-03-13 22:50:54.000000000 +0100
@@ -960,7 +960,7 @@
     // finally, stream it in the control
     EDITSTREAM eds;
     wxZeroMemory(eds);
-    eds.dwCookie = (DWORD)&wpc;
+    eds.dwCookie = (DWORD_PTR)&wpc;
     // the cast below is needed for broken (very) old mingw32 headers
     eds.pfnCallback = (EDITSTREAMCALLBACK)wxRichEditStreamIn;
 
Index: include/wx/defs.h
--- include/wx/defs.h	2009-03-06 13:10:51.000000000 +0100
+++ include/wx/defs.h	2010-03-20 14:17:40.000000000 +0100
@@ -823,73 +823,6 @@
 
 typedef wxUint32 wxDword;
 
-/*
-   Define an integral type big enough to contain all of long, size_t and void *.
- */
-#if SIZEOF_LONG >= SIZEOF_VOID_P && SIZEOF_LONG >= SIZEOF_SIZE_T
-    /* normal case */
-    typedef unsigned long wxUIntPtr;
-#elif SIZEOF_SIZE_T >= SIZEOF_VOID_P
-    /* Win64 case */
-    typedef size_t wxUIntPtr;
-#else
-    /*
-       This should never happen for the current architectures but if you're
-       using one where it does, please contact wx-dev@lists.wxwidgets.org.
-     */
-    #error "Pointers can't be stored inside integer types."
-#endif
-
-#ifdef __cplusplus
-/* And also define a couple of simple functions to cast pointer to/from it. */
-inline wxUIntPtr wxPtrToUInt(const void *p)
-{
-    /*
-       VC++ 7.1 gives warnings about casts such as below even when they're
-       explicit with /Wp64 option, suppress them as we really know what we're
-       doing here. Same thing with icc with -Wall.
-     */
-#ifdef __VISUALC__
-    #if __VISUALC__ >= 1200
-        #pragma warning(push)
-    #endif
-    /* pointer truncation from '' to '' */
-    #pragma warning(disable: 4311)
-#elif defined(__INTELC__)
-    #pragma warning(push)
-    /* conversion from pointer to same-sized integral type */
-    #pragma warning(disable: 1684)
-#endif
-
-    return wx_reinterpret_cast(wxUIntPtr, p);
-
-#if (defined(__VISUALC__) && __VISUALC__ >= 1200) || defined(__INTELC__)
-    #pragma warning(pop)
-#endif
-}
-
-inline void *wxUIntToPtr(wxUIntPtr p)
-{
-#ifdef __VISUALC__
-    #if __VISUALC__ >= 1200
-        #pragma warning(push)



( run in 0.473 second using v1.01-cache-2.11-cpan-39bf76dae61 )