Commit bc8faa926f5f349902ec6503a7bdfbe8856755a7
1 parent
87d711ff
user handler initialization macros
Showing
6 changed files
with
12 additions
and
12 deletions
... | ... | @@ -149,7 +149,7 @@ commManagerCvInit(TR_class_ptr cls) |
149 | 149 | TR_commManagerDisableWrite); |
150 | 150 | } |
151 | 151 | |
152 | -TR_INSTANCE(TR_Hash, commManagerEventMethods); | |
152 | +TR_INIT_HANDLER(TR_CommManager); | |
153 | 153 | TR_INIT_IFACE(TR_Class, commManagerCtor, commManagerDtor, NULL); |
154 | 154 | TR_INIT_IFACE(TR_CommManager, NULL, NULL, NULL, NULL, NULL, NULL, NULL); |
155 | 155 | TR_CREATE_CLASS( |
... | ... | @@ -158,7 +158,7 @@ TR_CREATE_CLASS( |
158 | 158 | commManagerCvInit, |
159 | 159 | TR_IF(TR_Class), |
160 | 160 | TR_IF(TR_CommManager)) = { |
161 | - { &(_commManagerEventMethods.data) } | |
161 | + { TR_HANDLER_CVARS(TR_CommManager) } | |
162 | 162 | }; |
163 | 163 | |
164 | 164 | // vim: set ts=4 sw=4: | ... | ... |
... | ... | @@ -99,14 +99,14 @@ connectorCvInit(TR_class_ptr cls) |
99 | 99 | connectorAccept); |
100 | 100 | } |
101 | 101 | |
102 | -TR_INSTANCE(TR_Hash, connectorEventMethods); | |
102 | +TR_INIT_HANDLER(TR_Connector); | |
103 | 103 | TR_INIT_IFACE(TR_Class, connectorCtor, connectorDtor, NULL); |
104 | 104 | TR_CREATE_CLASS( |
105 | 105 | TR_Connector, |
106 | 106 | TR_EventHandler, |
107 | 107 | connectorCvInit, |
108 | 108 | TR_IF(TR_Class)) = { |
109 | - { &(_connectorEventMethods.data) } | |
109 | + { TR_HANDLER_CVARS(TR_Connector) } | |
110 | 110 | }; |
111 | 111 | |
112 | 112 | // vim: set ts=4 sw=4: | ... | ... |
... | ... | @@ -170,14 +170,14 @@ ioHandlerCvInit(TR_class_ptr cls) |
170 | 170 | ioHandlerWrite); |
171 | 171 | } |
172 | 172 | |
173 | -TR_INSTANCE(TR_Hash, ioHandlerEventMethods); | |
173 | +TR_INIT_HANDLER(TR_IoHandler); | |
174 | 174 | TR_INIT_IFACE(TR_Class, ioHandlerCtor, ioHandlerDtor, NULL); |
175 | 175 | TR_CREATE_CLASS( |
176 | 176 | TR_IoHandler, |
177 | 177 | TR_EventHandler, |
178 | 178 | ioHandlerCvInit, |
179 | 179 | TR_IF(TR_Class)) = { |
180 | - { &(_ioHandlerEventMethods.data) } | |
180 | + { TR_HANDLER_CVARS(TR_IoHandler) } | |
181 | 181 | }; |
182 | 182 | |
183 | 183 | // vim: set ts=4 sw=4: | ... | ... |
... | ... | @@ -142,14 +142,14 @@ protocolHandlerCvInit(TR_class_ptr cls) |
142 | 142 | // protocolHandlerUpgrade); |
143 | 143 | } |
144 | 144 | |
145 | -TR_INSTANCE(TR_Hash, protocolHandlerEventMethods); | |
145 | +TR_INIT_HANDLER(TR_ProtocolHandler); | |
146 | 146 | TR_INIT_IFACE(TR_Class, protocolHandlerCtor, protocolHandlerDtor, NULL); |
147 | 147 | TR_CREATE_CLASS( |
148 | 148 | TR_ProtocolHandler, |
149 | 149 | TR_EventHandler, |
150 | 150 | protocolHandlerCvInit, |
151 | 151 | TR_IF(TR_Class)) = { |
152 | - { &(_protocolHandlerEventMethods.data) } | |
152 | + { TR_HANDLER_CVARS(TR_ProtocolHandler) } | |
153 | 153 | }; |
154 | 154 | |
155 | 155 | // vim: set ts=4 sw=4: | ... | ... |
... | ... | @@ -147,14 +147,14 @@ simpleClientCvInit(TR_class_ptr cls) |
147 | 147 | simpleClientHandleData); |
148 | 148 | } |
149 | 149 | |
150 | -TR_INSTANCE(TR_Hash, simpleClientEventMethods); | |
150 | +TR_INIT_HANDLER(TR_SimpleClient); | |
151 | 151 | TR_INIT_IFACE(TR_Class, simpleClientCtor, simpleClientDtor, NULL); |
152 | 152 | TR_CREATE_CLASS( |
153 | 153 | TR_SimpleClient, |
154 | 154 | TR_EventHandler, |
155 | 155 | simpleClientCvInit, |
156 | 156 | TR_IF(TR_Class)) = { |
157 | - { &(_simpleClientEventMethods.data) } | |
157 | + { TR_HANDLER_CVARS(TR_SimpleClient) } | |
158 | 158 | }; |
159 | 159 | |
160 | 160 | // vim: set ts=4 sw=4: | ... | ... |
... | ... | @@ -122,14 +122,14 @@ testHandlerCvInit(TR_class_ptr class) |
122 | 122 | #endif |
123 | 123 | } |
124 | 124 | |
125 | -TR_INSTANCE(TR_Hash, testHandlerEventMethods); | |
125 | +TR_INIT_HANDLER(TR_TestHandler); | |
126 | 126 | TR_INIT_IFACE(TR_Class, testHandlerCtor, testHandlerDtor, NULL); |
127 | 127 | TR_CREATE_CLASS( |
128 | 128 | TestHandler, |
129 | 129 | TR_EventHandler, |
130 | 130 | testHandlerCvInit, |
131 | 131 | TR_IF(TR_Class)) = { |
132 | - { &(_testHandlerEventMethods.data) } | |
132 | + { TR_HANDLER_CVARS(TR_TestHandler) } | |
133 | 133 | }; |
134 | 134 | |
135 | 135 | // vim: set ts=4 sw=4: | ... | ... |
Please
register
or
login
to post a comment