]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/socket.cpp
added wxDynamicObject (kind of delegate, docs to come once this has calmed down)
[wxWidgets.git] / src / common / socket.cpp
index b25ca3fd31536cab9b92cd421e2ff79e7e8a49f6..18030b71e01993f56f008cef88330ece69f37f59 100644 (file)
@@ -13,7 +13,7 @@
 // Declarations
 // ==========================================================================
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "socket.h"
 #endif
 
 #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;
 }
 
@@ -1298,7 +1308,7 @@ wxDatagramSocket& wxDatagramSocket::SendTo( wxSockAddress& addr,
 // wxSocketModule
 // ==========================================================================
 
-class WXDLLEXPORT wxSocketModule : public wxModule
+class wxSocketModule : public wxModule
 {
 public:
     virtual bool OnInit()