]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/socket.cpp
Added wxRTTI for the new wxVScrolledWindow, wxVListBox, and
[wxWidgets.git] / src / common / socket.cpp
index 96f06d81b2d157aa2e500a2aa4d09e8418fb619c..5816414509dc08f8c3526a084158287498d7261e 100644 (file)
 #include "wx/sckaddr.h"
 #include "wx/socket.h"
 
+// DLL options compatibility check:
+#include "wx/build.h"
+WX_CHECK_BUILD_OPTIONS("wxNet")
+
 // --------------------------------------------------------------------------
 // macros and constants
 // --------------------------------------------------------------------------
@@ -122,6 +126,12 @@ bool wxSocketBase::Initialize()
 {
     if ( !m_countInit++ )
     {
+        wxAppTraits *traits = wxAppConsole::GetInstance() ?
+                              wxAppConsole::GetInstance()->GetTraits() : NULL;
+        GSocketGUIFunctionsTable *functions = 
+            traits ? traits->GetSocketGUIFunctionsTable() : NULL;
+        GSocket_SetGUIFunctions(functions);
+        
         if ( !GSocket_Init() )
         {
             m_countInit--;
@@ -828,7 +838,7 @@ void wxSocketBase::SaveState()
 
 void wxSocketBase::RestoreState()
 {
-  wxNode *node;
+  wxList::compatibility_iterator node;
   wxSocketState *state;
 
   node = m_states.GetLast();
@@ -846,7 +856,7 @@ void wxSocketBase::RestoreState()
   m_cdata      = state->m_cdata;
 #endif // WXWIN_COMPATIBILITY
 
-  delete node;
+  m_states.Erase(node);
   delete state;
 }