Lines Matching refs:packet

131 	ZEND_ARG_INFO(0, packet)
266 wddx_packet *packet; in PS_SERIALIZER_ENCODE_FUNC() local
269 packet = php_wddx_constructor(); in PS_SERIALIZER_ENCODE_FUNC()
271 php_wddx_packet_start(packet, NULL, 0); in PS_SERIALIZER_ENCODE_FUNC()
272 php_wddx_add_chunk_static(packet, WDDX_STRUCT_S); in PS_SERIALIZER_ENCODE_FUNC()
275 php_wddx_serialize_var(packet, *struc, key, key_length TSRMLS_CC); in PS_SERIALIZER_ENCODE_FUNC()
278 php_wddx_add_chunk_static(packet, WDDX_STRUCT_E); in PS_SERIALIZER_ENCODE_FUNC()
279 php_wddx_packet_end(packet); in PS_SERIALIZER_ENCODE_FUNC()
280 *newstr = php_wddx_gather(packet); in PS_SERIALIZER_ENCODE_FUNC()
281 php_wddx_destructor(packet); in PS_SERIALIZER_ENCODE_FUNC()
369 void php_wddx_packet_start(wddx_packet *packet, char *comment, int comment_len) in php_wddx_packet_start() argument
371 php_wddx_add_chunk_static(packet, WDDX_PACKET_S); in php_wddx_packet_start()
373 php_wddx_add_chunk_static(packet, WDDX_HEADER_S); in php_wddx_packet_start()
374 php_wddx_add_chunk_static(packet, WDDX_COMMENT_S); in php_wddx_packet_start()
375 php_wddx_add_chunk_ex(packet, comment, comment_len); in php_wddx_packet_start()
376 php_wddx_add_chunk_static(packet, WDDX_COMMENT_E); in php_wddx_packet_start()
377 php_wddx_add_chunk_static(packet, WDDX_HEADER_E); in php_wddx_packet_start()
379 php_wddx_add_chunk_static(packet, WDDX_HEADER); in php_wddx_packet_start()
381 php_wddx_add_chunk_static(packet, WDDX_DATA_S); in php_wddx_packet_start()
387 void php_wddx_packet_end(wddx_packet *packet) in php_wddx_packet_end() argument
389 php_wddx_add_chunk_static(packet, WDDX_DATA_E); in php_wddx_packet_end()
390 php_wddx_add_chunk_static(packet, WDDX_PACKET_E); in php_wddx_packet_end()
396 php_wddx_add_chunk_ex(packet, buf, l); \
402 static void php_wddx_serialize_string(wddx_packet *packet, zval *var TSRMLS_DC) in php_wddx_serialize_string() argument
404 php_wddx_add_chunk_static(packet, WDDX_STRING_S); in php_wddx_serialize_string()
412 php_wddx_add_chunk_ex(packet, buf, buf_len); in php_wddx_serialize_string()
416 php_wddx_add_chunk_static(packet, WDDX_STRING_E); in php_wddx_serialize_string()
422 static void php_wddx_serialize_number(wddx_packet *packet, zval *var) in php_wddx_serialize_number() argument
433 php_wddx_add_chunk(packet, tmp_buf); in php_wddx_serialize_number()
439 static void php_wddx_serialize_boolean(wddx_packet *packet, zval *var) in php_wddx_serialize_boolean() argument
441 php_wddx_add_chunk(packet, Z_LVAL_P(var) ? WDDX_BOOLEAN_TRUE : WDDX_BOOLEAN_FALSE); in php_wddx_serialize_boolean()
447 static void php_wddx_serialize_unset(wddx_packet *packet) in php_wddx_serialize_unset() argument
449 php_wddx_add_chunk_static(packet, WDDX_NULL); in php_wddx_serialize_unset()
455 static void php_wddx_serialize_object(wddx_packet *packet, zval *obj) in php_wddx_serialize_object() argument
479 php_wddx_add_chunk_static(packet, WDDX_STRUCT_S); in php_wddx_serialize_object()
481 php_wddx_add_chunk(packet, tmp_buf); in php_wddx_serialize_object()
482 php_wddx_add_chunk_static(packet, WDDX_STRING_S); in php_wddx_serialize_object()
483 php_wddx_add_chunk_ex(packet, class_name, name_len); in php_wddx_serialize_object()
484 php_wddx_add_chunk_static(packet, WDDX_STRING_E); in php_wddx_serialize_object()
485 php_wddx_add_chunk_static(packet, WDDX_VAR_E); in php_wddx_serialize_object()
500 php_wddx_serialize_var(packet, *ent, Z_STRVAL_PP(varname), Z_STRLEN_PP(varname) TSRMLS_CC); in php_wddx_serialize_object()
504 php_wddx_add_chunk_static(packet, WDDX_STRUCT_E); in php_wddx_serialize_object()
513 php_wddx_add_chunk_static(packet, WDDX_STRUCT_S); in php_wddx_serialize_object()
515 php_wddx_add_chunk(packet, tmp_buf); in php_wddx_serialize_object()
516 php_wddx_add_chunk_static(packet, WDDX_STRING_S); in php_wddx_serialize_object()
517 php_wddx_add_chunk_ex(packet, class_name, name_len); in php_wddx_serialize_object()
518 php_wddx_add_chunk_static(packet, WDDX_STRING_E); in php_wddx_serialize_object()
519 php_wddx_add_chunk_static(packet, WDDX_VAR_E); in php_wddx_serialize_object()
535 php_wddx_serialize_var(packet, *ent, prop_name, strlen(prop_name)+1 TSRMLS_CC); in php_wddx_serialize_object()
538 php_wddx_serialize_var(packet, *ent, tmp_buf, key_len TSRMLS_CC); in php_wddx_serialize_object()
541 php_wddx_add_chunk_static(packet, WDDX_STRUCT_E); in php_wddx_serialize_object()
555 static void php_wddx_serialize_array(wddx_packet *packet, zval *arr) in php_wddx_serialize_array() argument
590 php_wddx_add_chunk_static(packet, WDDX_STRUCT_S); in php_wddx_serialize_array()
593 php_wddx_add_chunk(packet, tmp_buf); in php_wddx_serialize_array()
607 php_wddx_serialize_var(packet, *ent, key, key_len TSRMLS_CC); in php_wddx_serialize_array()
610 php_wddx_serialize_var(packet, *ent, tmp_buf, key_len TSRMLS_CC); in php_wddx_serialize_array()
613 php_wddx_serialize_var(packet, *ent, NULL, 0 TSRMLS_CC); in php_wddx_serialize_array()
618 php_wddx_add_chunk_static(packet, WDDX_STRUCT_E); in php_wddx_serialize_array()
620 php_wddx_add_chunk_static(packet, WDDX_ARRAY_E); in php_wddx_serialize_array()
627 void php_wddx_serialize_var(wddx_packet *packet, zval *var, char *name, int name_len TSRMLS_DC) in php_wddx_serialize_var() argument
638 php_wddx_add_chunk(packet, tmp_buf); in php_wddx_serialize_var()
645 php_wddx_serialize_string(packet, var TSRMLS_CC); in php_wddx_serialize_var()
650 php_wddx_serialize_number(packet, var); in php_wddx_serialize_var()
654 php_wddx_serialize_boolean(packet, var); in php_wddx_serialize_var()
658 php_wddx_serialize_unset(packet); in php_wddx_serialize_var()
668 php_wddx_serialize_array(packet, var); in php_wddx_serialize_var()
679 php_wddx_serialize_object(packet, var); in php_wddx_serialize_var()
685 php_wddx_add_chunk_static(packet, WDDX_VAR_E); in php_wddx_serialize_var()
692 static void php_wddx_add_var(wddx_packet *packet, zval *name_var) in php_wddx_add_var() argument
704 php_wddx_serialize_var(packet, *val, Z_STRVAL_P(name_var), Z_STRLEN_P(name_var) TSRMLS_CC); in php_wddx_add_var()
723 php_wddx_add_var(packet, *val); in php_wddx_add_var()
1164 wddx_packet *packet; in PHP_FUNCTION() local
1170 packet = php_wddx_constructor(); in PHP_FUNCTION()
1172 php_wddx_packet_start(packet, comment, comment_len); in PHP_FUNCTION()
1173 php_wddx_serialize_var(packet, var, NULL, 0 TSRMLS_CC); in PHP_FUNCTION()
1174 php_wddx_packet_end(packet); in PHP_FUNCTION()
1176 ZVAL_STRINGL(return_value, packet->c, packet->len, 1); in PHP_FUNCTION()
1177 smart_str_free(packet); in PHP_FUNCTION()
1178 efree(packet); in PHP_FUNCTION()
1187 wddx_packet *packet; in PHP_FUNCTION() local
1194 packet = php_wddx_constructor(); in PHP_FUNCTION()
1196 php_wddx_packet_start(packet, NULL, 0); in PHP_FUNCTION()
1197 php_wddx_add_chunk_static(packet, WDDX_STRUCT_S); in PHP_FUNCTION()
1203 php_wddx_add_var(packet, *args[i]); in PHP_FUNCTION()
1206 php_wddx_add_chunk_static(packet, WDDX_STRUCT_E); in PHP_FUNCTION()
1207 php_wddx_packet_end(packet); in PHP_FUNCTION()
1211 ZVAL_STRINGL(return_value, packet->c, packet->len, 1); in PHP_FUNCTION()
1212 smart_str_free(packet); in PHP_FUNCTION()
1213 efree(packet); in PHP_FUNCTION()
1221 smart_str *packet; in php_wddx_constructor() local
1223 packet = (smart_str *)emalloc(sizeof(smart_str)); in php_wddx_constructor()
1224 packet->c = NULL; in php_wddx_constructor()
1226 return packet; in php_wddx_constructor()
1232 void php_wddx_destructor(wddx_packet *packet) in php_wddx_destructor() argument
1234 smart_str_free(packet); in php_wddx_destructor()
1235 efree(packet); in php_wddx_destructor()
1245 wddx_packet *packet; in PHP_FUNCTION() local
1253 packet = php_wddx_constructor(); in PHP_FUNCTION()
1255 php_wddx_packet_start(packet, comment, comment_len); in PHP_FUNCTION()
1256 php_wddx_add_chunk_static(packet, WDDX_STRUCT_S); in PHP_FUNCTION()
1258 ZEND_REGISTER_RESOURCE(return_value, packet, le_wddx); in PHP_FUNCTION()
1267 wddx_packet *packet = NULL; in PHP_FUNCTION() local
1273 ZEND_FETCH_RESOURCE(packet, wddx_packet *, &packet_id, -1, "WDDX packet ID", le_wddx); in PHP_FUNCTION()
1275 php_wddx_add_chunk_static(packet, WDDX_STRUCT_E); in PHP_FUNCTION()
1277 php_wddx_packet_end(packet); in PHP_FUNCTION()
1279 ZVAL_STRINGL(return_value, packet->c, packet->len, 1); in PHP_FUNCTION()
1292 wddx_packet *packet = NULL; in PHP_FUNCTION() local
1298 …if (!ZEND_FETCH_RESOURCE_NO_RETURN(packet, wddx_packet *, &packet_id, -1, "WDDX packet ID", le_wdd… in PHP_FUNCTION()
1303 if (!packet) { in PHP_FUNCTION()
1312 php_wddx_add_var(packet, (*args[i])); in PHP_FUNCTION()
1324 zval *packet; in PHP_FUNCTION() local
1329 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &packet) == FAILURE) { in PHP_FUNCTION()
1333 if (Z_TYPE_P(packet) == IS_STRING) { in PHP_FUNCTION()
1334 payload = Z_STRVAL_P(packet); in PHP_FUNCTION()
1335 payload_len = Z_STRLEN_P(packet); in PHP_FUNCTION()
1336 } else if (Z_TYPE_P(packet) == IS_RESOURCE) { in PHP_FUNCTION()
1337 php_stream_from_zval(stream, &packet); in PHP_FUNCTION()