]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/appbase.cpp
fixed warnings about pointer to integer cast
[wxWidgets.git] / src / common / appbase.cpp
index 0892aab62d0e8724923a18458de698eefa927921..fe7471e1c7993d91938a105c2df9727b49ea2f82 100644 (file)
 #endif
 
 #if defined(__WXMAC__)
 #endif
 
 #if defined(__WXMAC__)
-    // VZ: MacTypes.h is enough under Mac OS X (where I could test it) but
-    //     I don't know which headers are needed under earlier systems so
-    //     include everything when in doubt
     #ifdef __DARWIN__
     #ifdef __DARWIN__
-        #include  "MacTypes.h"
+        #include  <CoreServices/CoreServices.h>
     #else
         #include  "wx/mac/private.h"  // includes mac headers
     #endif
     #else
         #include  "wx/mac/private.h"  // includes mac headers
     #endif
     #endif // wxUSE_STACKWALKER
 #endif // __WXDEBUG__
 
     #endif // wxUSE_STACKWALKER
 #endif // __WXDEBUG__
 
+// wxABI_VERSION can be defined when compiling applications but it should be
+// left undefined when compiling the library itself, it is then set to its
+// default value in version.h
+#if wxABI_VERSION != wxMAJOR_VERSION * 10000 + wxMINOR_VERSION * 100 + 99
+#error "wxABI_VERSION should not be defined when compiling the library"
+#endif
+
 // ----------------------------------------------------------------------------
 // private functions prototypes
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // private functions prototypes
 // ----------------------------------------------------------------------------
@@ -140,11 +144,11 @@ wxAppConsole::~wxAppConsole()
 // initilization/cleanup
 // ----------------------------------------------------------------------------
 
 // initilization/cleanup
 // ----------------------------------------------------------------------------
 
-bool wxAppConsole::Initialize(int& argc, wxChar **argv)
+bool wxAppConsole::Initialize(int& argcOrig, wxChar **argvOrig)
 {
     // remember the command line arguments
 {
     // remember the command line arguments
-    this->argc = argc;
-    this->argv = argv;
+    argc = argcOrig;
+    argv = argvOrig;
 
 #ifndef __WXPALMOS__
     if ( m_appName.empty() && argv )
 
 #ifndef __WXPALMOS__
     if ( m_appName.empty() && argv )
@@ -707,12 +711,6 @@ static wxString GetAssertStackTrace()
 {
     wxString stackTrace;
 
 {
     wxString stackTrace;
 
-#if wxUSE_DBGHELP
-    // check that we can get the stack trace before trying to do it
-    if ( !wxDbgHelpDLL::Init() )
-        return stackTrace;
-#endif
-    
     class StackDump : public wxStackWalker
     {
     public:
     class StackDump : public wxStackWalker
     {
     public:
@@ -723,7 +721,11 @@ static wxString GetAssertStackTrace()
     protected:
         virtual void OnStackFrame(const wxStackFrame& frame)
         {
     protected:
         virtual void OnStackFrame(const wxStackFrame& frame)
         {
-            m_stackTrace << wxString::Format(_T("[%02d] "), frame.GetLevel());
+            m_stackTrace << wxString::Format
+                            (
+                              _T("[%02d] "),
+                              wx_truncate_cast(int, frame.GetLevel())
+                            );
 
             wxString name = frame.GetName();
             if ( !name.empty() )
 
             wxString name = frame.GetName();
             if ( !name.empty() )
@@ -732,11 +734,8 @@ static wxString GetAssertStackTrace()
             }
             else
             {
             }
             else
             {
-                m_stackTrace << wxString::Format
-                                (
-                                    _T("0x%08lx"),
-                                    (unsigned long)frame.GetAddress()
-                                );
+                m_stackTrace << wxString::Format(_T("0x%08p"),
+                                                 frame.GetAddress());
             }
 
             if ( frame.HasSourceLocation() )
             }
 
             if ( frame.HasSourceLocation() )