]> git.saurik.com Git - wxWidgets.git/commitdiff
removed pragma interface which resulted in link errors when inline functions from...
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 15 Oct 2004 20:58:23 +0000 (20:58 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 15 Oct 2004 20:58:23 +0000 (20:58 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29895 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/defs.h

index fb6d8b018cb443f5ff79eaeedefadadca0ad1156..5384b976963e0663ebb5a65e8222045f000a13c7 100644 (file)
 #ifndef _WX_DEFS_H_
 #define _WX_DEFS_H_
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface "defs.h"
-#endif
-
 /*  ---------------------------------------------------------------------------- */
 /*  compiler and OS identification */
 /*  ---------------------------------------------------------------------------- */
@@ -779,8 +775,8 @@ typedef wxUint32 wxDword;
 #endif
 
 #ifdef __cplusplus
-/* And also define a simple function to cast pointer to it. */
-inline wxUIntPtr wxPtrToUInt(void *p)
+/* 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
@@ -797,6 +793,11 @@ inline wxUIntPtr wxPtrToUInt(void *p)
     #pragma warning(default: 4311)
 #endif
 }
+
+inline void *wxUIntToPtr(wxUIntPtr p)
+{
+    return wx_reinterpret_cast(void *, p);
+}
 #endif /*__cplusplus*/
 
 
@@ -1048,12 +1049,6 @@ typedef float wxFloat32;
     #define wxUINT64_SWAP_ON_BE(val)  (val)
 #endif
 
-/*  Macros to convert from unsigned long to void pointer. */
-/*  High order truncation occurs if the respective type is not large enough. */
-#define WXPTRULONGSLICE (((wxBYTE_ORDER==wxBIG_ENDIAN)&&(sizeof(void*)==8)&&(sizeof(unsigned long)<8))?1:0)
-#define wxPtrToULong(p) (((unsigned long*)(&(p)))[WXPTRULONGSLICE])
-#define wxULongToPtr(p,n) (p=NULL,wxPtrToULong(p)=(unsigned long)(n),p)
-
 /*  ---------------------------------------------------------------------------- */
 /*  Geometric flags */
 /*  ---------------------------------------------------------------------------- */