Commit f4c630f613e23d40f661a03f82923c4e7ffdd30c
1 parent
2a917f84
initialize static instance creation
Showing
3 changed files
with
9 additions
and
0 deletions
... | ... | @@ -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); | ... | ... |
Please
register
or
login
to post a comment