@@ -172,29 +172,39 @@ void php_tp_encode_delete(smart_string *str, uint32_t sync,
172
172
php_mp_pack (str , tuple );
173
173
}
174
174
175
- size_t php_tp_sizeof_call (uint32_t sync ,
176
- uint32_t proc_len , zval * tuple ) {
177
- return php_tp_sizeof_header (TNT_CALL , sync ) +
175
+ static size_t php_tp_sizeof_call (uint32_t sync , uint32_t proc_len ,
176
+ enum tnt_request_type type , zval * tuple ) {
177
+ return php_tp_sizeof_header (type , sync ) +
178
178
php_mp_sizeof_hash (2 ) +
179
179
php_mp_sizeof_long (TNT_FUNCTION ) +
180
180
php_mp_sizeof_string (proc_len ) +
181
181
php_mp_sizeof_long (TNT_TUPLE ) +
182
182
php_mp_sizeof (tuple ) ;
183
183
}
184
184
185
- void php_tp_encode_call (smart_string * str , uint32_t sync ,
186
- char * proc , uint32_t proc_len , zval * tuple ) {
187
- size_t packet_size = php_tp_sizeof_call ( sync ,
188
- proc_len , tuple );
185
+ static void php_tp_encode_call_common (smart_string * str , uint32_t sync ,
186
+ char * proc , uint32_t proc_len ,
187
+ enum tnt_request_type type , zval * tuple ) {
188
+ size_t packet_size = php_tp_sizeof_call ( sync , proc_len , type , tuple );
189
189
smart_string_ensure (str , packet_size + 5 );
190
- php_tp_pack_header (str , packet_size , TNT_CALL , sync );
190
+ php_tp_pack_header (str , packet_size , type , sync );
191
191
php_mp_pack_hash (str , 2 );
192
192
php_mp_pack_long (str , TNT_FUNCTION );
193
193
php_mp_pack_string (str , proc , proc_len );
194
194
php_mp_pack_long (str , TNT_TUPLE );
195
195
php_mp_pack (str , tuple );
196
196
}
197
197
198
+ void php_tp_encode_call (smart_string * str , uint32_t sync , char * proc ,
199
+ uint32_t proc_len , zval * tuple ) {
200
+ php_tp_encode_call_common (str ,sync , proc , proc_len , TNT_CALL , tuple );
201
+ }
202
+
203
+ void php_tp_encode_call_16 (smart_string * str , uint32_t sync , char * proc ,
204
+ uint32_t proc_len , zval * tuple ) {
205
+ php_tp_encode_call_common (str ,sync , proc , proc_len , TNT_CALL_16 , tuple );
206
+ }
207
+
198
208
size_t php_tp_sizeof_eval (uint32_t sync ,
199
209
uint32_t proc_len , zval * tuple ) {
200
210
return php_tp_sizeof_header (TNT_EVAL , sync ) +
0 commit comments