Commit f4c630f613e23d40f661a03f82923c4e7ffdd30c

Authored by Georg Hopp
1 parent 2a917f84

initialize static instance creation

... ... @@ -38,6 +38,8 @@ TR_CLASS(TR_RemoteData) {
38 38 socklen_t addrlen;
39 39 };
40 40
  41 +TR_INSTANCE_INIT(TR_RemoteData);
  42 +
41 43 extern TR_RemoteData TR_emptyRemoteData;
42 44
43 45 void TR_remoteDataSetData(TR_RemoteData, unsigned char *, size_t);
... ...
... ... @@ -58,6 +58,8 @@ TR_CLASS(TR_Socket) {
58 58 TR_SocketFin fin_state;
59 59 };
60 60
  61 +TR_INSTANCE_INIT(TR_Socket);
  62 +
61 63 #define TR_socketLog(socket) (((TR_Socket)(socket))->log)
62 64 #define TR_socketFlags(socket) (((TR_Socket)(socket))->flags)
63 65 #define TR_socketType(socket) (((TR_Socket)(socket))->type)
... ... @@ -82,10 +84,14 @@ TR_CLASS(TR_TcpSocket) {
82 84 int connected;
83 85 };
84 86
  87 +TR_INSTANCE_INIT(TR_TcpSocket);
  88 +
85 89 TR_CLASS(TR_UdpSocket) {
86 90 TR_EXTENDS(TR_Socket);
87 91 };
88 92
  93 +TR_INSTANCE_INIT(TR_UdpSocket);
  94 +
89 95 typedef int (* TR_socketAction_fptr)(void *);
90 96
91 97 int TR_socketInit(TR_Socket, TR_socketAction_fptr);
... ...
... ... @@ -40,6 +40,7 @@ TR_CLASS(TR_Stream) {
40 40 SSL * ssl;
41 41 } handle;
42 42 };
  43 +TR_INSTANCE_INIT(TR_Stream);
43 44
44 45 ssize_t TR_streamRead(TR_Stream, void *, size_t);
45 46 ssize_t TR_streamWrite(TR_Stream, void *, size_t);
... ...
Please register or login to post a comment