Lines Matching refs:packet

129 	ZEND_ARG_INFO(0, packet)
268 wddx_packet *packet; in PS_SERIALIZER_ENCODE_FUNC() local
272 packet = php_wddx_constructor(); in PS_SERIALIZER_ENCODE_FUNC()
274 php_wddx_packet_start(packet, NULL, 0); in PS_SERIALIZER_ENCODE_FUNC()
275 php_wddx_add_chunk_static(packet, WDDX_STRUCT_S); in PS_SERIALIZER_ENCODE_FUNC()
278 php_wddx_serialize_var(packet, struc, key); in PS_SERIALIZER_ENCODE_FUNC()
281 php_wddx_add_chunk_static(packet, WDDX_STRUCT_E); in PS_SERIALIZER_ENCODE_FUNC()
282 php_wddx_packet_end(packet); in PS_SERIALIZER_ENCODE_FUNC()
283 smart_str_0(packet); in PS_SERIALIZER_ENCODE_FUNC()
284 str = zend_string_copy(packet->s); in PS_SERIALIZER_ENCODE_FUNC()
285 php_wddx_destructor(packet); in PS_SERIALIZER_ENCODE_FUNC()
365 void php_wddx_packet_start(wddx_packet *packet, char *comment, size_t comment_len) in php_wddx_packet_start() argument
367 php_wddx_add_chunk_static(packet, WDDX_PACKET_S); in php_wddx_packet_start()
372 php_wddx_add_chunk_static(packet, WDDX_HEADER_S); in php_wddx_packet_start()
373 php_wddx_add_chunk_static(packet, WDDX_COMMENT_S); in php_wddx_packet_start()
374 php_wddx_add_chunk_ex(packet, ZSTR_VAL(escaped), ZSTR_LEN(escaped)); in php_wddx_packet_start()
375 php_wddx_add_chunk_static(packet, WDDX_COMMENT_E); in php_wddx_packet_start()
376 php_wddx_add_chunk_static(packet, WDDX_HEADER_E); in php_wddx_packet_start()
380 php_wddx_add_chunk_static(packet, WDDX_HEADER); in php_wddx_packet_start()
382 php_wddx_add_chunk_static(packet, WDDX_DATA_S); in php_wddx_packet_start()
388 void php_wddx_packet_end(wddx_packet *packet) in php_wddx_packet_end() argument
390 php_wddx_add_chunk_static(packet, WDDX_DATA_E); in php_wddx_packet_end()
391 php_wddx_add_chunk_static(packet, WDDX_PACKET_E); in php_wddx_packet_end()
397 php_wddx_add_chunk_ex(packet, buf, l); \
403 static void php_wddx_serialize_string(wddx_packet *packet, zval *var) in php_wddx_serialize_string() argument
405 php_wddx_add_chunk_static(packet, WDDX_STRING_S); in php_wddx_serialize_string()
411 php_wddx_add_chunk_ex(packet, ZSTR_VAL(buf), ZSTR_LEN(buf)); in php_wddx_serialize_string()
415 php_wddx_add_chunk_static(packet, WDDX_STRING_E); in php_wddx_serialize_string()
421 static void php_wddx_serialize_number(wddx_packet *packet, zval *var) in php_wddx_serialize_number() argument
432 php_wddx_add_chunk(packet, tmp_buf); in php_wddx_serialize_number()
438 static void php_wddx_serialize_boolean(wddx_packet *packet, zval *var) in php_wddx_serialize_boolean() argument
440 php_wddx_add_chunk(packet, Z_TYPE_P(var) == IS_TRUE ? WDDX_BOOLEAN_TRUE : WDDX_BOOLEAN_FALSE); in php_wddx_serialize_boolean()
446 static void php_wddx_serialize_unset(wddx_packet *packet) in php_wddx_serialize_unset() argument
448 php_wddx_add_chunk_static(packet, WDDX_NULL); in php_wddx_serialize_unset()
454 static void php_wddx_serialize_object(wddx_packet *packet, zval *obj) in php_wddx_serialize_object() argument
481 php_wddx_add_chunk_static(packet, WDDX_STRUCT_S); in php_wddx_serialize_object()
483 php_wddx_add_chunk(packet, tmp_buf); in php_wddx_serialize_object()
484 php_wddx_add_chunk_static(packet, WDDX_STRING_S); in php_wddx_serialize_object()
485 php_wddx_add_chunk_ex(packet, ZSTR_VAL(class_name), ZSTR_LEN(class_name)); in php_wddx_serialize_object()
486 php_wddx_add_chunk_static(packet, WDDX_STRING_E); in php_wddx_serialize_object()
487 php_wddx_add_chunk_static(packet, WDDX_VAR_E); in php_wddx_serialize_object()
498 php_wddx_serialize_var(packet, ent, Z_STR_P(varname)); in php_wddx_serialize_object()
502 php_wddx_add_chunk_static(packet, WDDX_STRUCT_E); in php_wddx_serialize_object()
505 php_wddx_add_chunk_static(packet, WDDX_STRUCT_S); in php_wddx_serialize_object()
507 php_wddx_add_chunk(packet, tmp_buf); in php_wddx_serialize_object()
508 php_wddx_add_chunk_static(packet, WDDX_STRING_S); in php_wddx_serialize_object()
509 php_wddx_add_chunk_ex(packet, ZSTR_VAL(class_name), ZSTR_LEN(class_name)); in php_wddx_serialize_object()
510 php_wddx_add_chunk_static(packet, WDDX_STRING_E); in php_wddx_serialize_object()
511 php_wddx_add_chunk_static(packet, WDDX_VAR_E); in php_wddx_serialize_object()
525 php_wddx_serialize_var(packet, ent, tmp); in php_wddx_serialize_object()
529 php_wddx_serialize_var(packet, ent, key); in php_wddx_serialize_object()
533 php_wddx_add_chunk_static(packet, WDDX_STRUCT_E); in php_wddx_serialize_object()
545 static void php_wddx_serialize_array(wddx_packet *packet, zval *arr) in php_wddx_serialize_array() argument
570 php_wddx_add_chunk_static(packet, WDDX_STRUCT_S); in php_wddx_serialize_array()
573 php_wddx_add_chunk(packet, tmp_buf); in php_wddx_serialize_array()
583 php_wddx_serialize_var(packet, ent, key); in php_wddx_serialize_array()
586 php_wddx_serialize_var(packet, ent, key); in php_wddx_serialize_array()
590 php_wddx_serialize_var(packet, ent, NULL); in php_wddx_serialize_array()
595 php_wddx_add_chunk_static(packet, WDDX_STRUCT_E); in php_wddx_serialize_array()
597 php_wddx_add_chunk_static(packet, WDDX_ARRAY_E); in php_wddx_serialize_array()
604 void php_wddx_serialize_var(wddx_packet *packet, zval *var, zend_string *name) in php_wddx_serialize_var() argument
613 php_wddx_add_chunk(packet, tmp_buf); in php_wddx_serialize_var()
624 php_wddx_serialize_string(packet, var); in php_wddx_serialize_var()
629 php_wddx_serialize_number(packet, var); in php_wddx_serialize_var()
634 php_wddx_serialize_boolean(packet, var); in php_wddx_serialize_var()
638 php_wddx_serialize_unset(packet); in php_wddx_serialize_var()
650 php_wddx_serialize_array(packet, var); in php_wddx_serialize_var()
663 php_wddx_serialize_object(packet, var); in php_wddx_serialize_var()
669 php_wddx_add_chunk_static(packet, WDDX_VAR_E); in php_wddx_serialize_var()
676 static void php_wddx_add_var(wddx_packet *packet, zval *name_var) in php_wddx_add_var() argument
687 php_wddx_serialize_var(packet, val, Z_STR_P(name_var)); in php_wddx_add_var()
701 php_wddx_add_var(packet, val); in php_wddx_add_var()
710 php_wddx_add_var(packet, val); in php_wddx_add_var()
1142 wddx_packet *packet; in PHP_FUNCTION() local
1148 packet = php_wddx_constructor(); in PHP_FUNCTION()
1150 php_wddx_packet_start(packet, comment, comment_len); in PHP_FUNCTION()
1151 php_wddx_serialize_var(packet, var, NULL); in PHP_FUNCTION()
1152 php_wddx_packet_end(packet); in PHP_FUNCTION()
1153 smart_str_0(packet); in PHP_FUNCTION()
1155 RETVAL_STR_COPY(packet->s); in PHP_FUNCTION()
1156 php_wddx_destructor(packet); in PHP_FUNCTION()
1165 wddx_packet *packet; in PHP_FUNCTION() local
1172 packet = php_wddx_constructor(); in PHP_FUNCTION()
1174 php_wddx_packet_start(packet, NULL, 0); in PHP_FUNCTION()
1175 php_wddx_add_chunk_static(packet, WDDX_STRUCT_S); in PHP_FUNCTION()
1187 php_wddx_add_var(packet, arg); in PHP_FUNCTION()
1190 php_wddx_add_chunk_static(packet, WDDX_STRUCT_E); in PHP_FUNCTION()
1191 php_wddx_packet_end(packet); in PHP_FUNCTION()
1192 smart_str_0(packet); in PHP_FUNCTION()
1194 RETVAL_STR_COPY(packet->s); in PHP_FUNCTION()
1195 php_wddx_destructor(packet); in PHP_FUNCTION()
1203 smart_str *packet; in php_wddx_constructor() local
1205 packet = ecalloc(1, sizeof(smart_str)); in php_wddx_constructor()
1207 return packet; in php_wddx_constructor()
1213 void php_wddx_destructor(wddx_packet *packet) in php_wddx_destructor() argument
1215 smart_str_free(packet); in php_wddx_destructor()
1216 efree(packet); in php_wddx_destructor()
1226 wddx_packet *packet; in PHP_FUNCTION() local
1234 packet = php_wddx_constructor(); in PHP_FUNCTION()
1236 php_wddx_packet_start(packet, comment, comment_len); in PHP_FUNCTION()
1237 php_wddx_add_chunk_static(packet, WDDX_STRUCT_S); in PHP_FUNCTION()
1239 RETURN_RES(zend_register_resource(packet, le_wddx)); in PHP_FUNCTION()
1248 wddx_packet *packet = NULL; in PHP_FUNCTION() local
1254 …if ((packet = (wddx_packet *)zend_fetch_resource(Z_RES_P(packet_id), "WDDX packet ID", le_wddx)) =… in PHP_FUNCTION()
1258 php_wddx_add_chunk_static(packet, WDDX_STRUCT_E); in PHP_FUNCTION()
1260 php_wddx_packet_end(packet); in PHP_FUNCTION()
1261 smart_str_0(packet); in PHP_FUNCTION()
1263 RETVAL_STR_COPY(packet->s); in PHP_FUNCTION()
1276 wddx_packet *packet = NULL; in PHP_FUNCTION() local
1282 …if ((packet = (wddx_packet *)zend_fetch_resource(Z_RES_P(packet_id), "WDDX packet ID", le_wddx)) =… in PHP_FUNCTION()
1296 php_wddx_add_var(packet, arg); in PHP_FUNCTION()
1307 zval *packet; in PHP_FUNCTION() local
1311 if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &packet) == FAILURE) { in PHP_FUNCTION()
1315 if (Z_TYPE_P(packet) == IS_STRING) { in PHP_FUNCTION()
1316 payload = Z_STR_P(packet); in PHP_FUNCTION()
1317 } else if (Z_TYPE_P(packet) == IS_RESOURCE) { in PHP_FUNCTION()
1318 php_stream_from_zval(stream, packet); in PHP_FUNCTION()