Commit bc8faa926f5f349902ec6503a7bdfbe8856755a7

Authored by Georg Hopp
1 parent 87d711ff

user handler initialization macros

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