Fix compilation with older (before C99) C compilers.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott 2004-07-22 20:25:48 +00:00
parent d2d049f28a
commit db36543353

View File

@ -53,6 +53,9 @@ struct MacGSocketData* _GSocket_Get_Mac_Socket(GSocket *socket)
/* If socket is already created, returns a pointer to the data */
/* Otherwise, creates socket and returns the pointer */
CFSocketContext cont;
CFSocketRef cf;
CFRunLoopSourceRef source;
struct MacGSocketData* data = (struct MacGSocketData*)socket->m_gui_dependent;
if (data && data->source) return data;
@ -63,9 +66,9 @@ struct MacGSocketData* _GSocket_Get_Mac_Socket(GSocket *socket)
cont.release = NULL; cont.copyDescription = NULL;
cont.info = socket;
CFSocketRef cf = CFSocketCreateWithNative(NULL, socket->m_fd,
cf = CFSocketCreateWithNative(NULL, socket->m_fd,
ALL_CALLBACK_TYPES, Mac_Socket_Callback, &cont);
CFRunLoopSourceRef source = CFSocketCreateRunLoopSource(NULL, cf, 0);
source = CFSocketCreateRunLoopSource(NULL, cf, 0);
assert(source);
socket->m_gui_dependent = (char*)data;