cvs: php4 /ext/wddx wddx.c
| From: | Andrei Zmievski | Date: | Tue, 14 Aug 2001 20:33:20 +0000 |
| Subject: | cvs: php4 /ext/wddx wddx.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-6849@lists.php.net to get a copy of this message | ||
andrei Tue Aug 14 16:33:20 2001 EDT
Modified files:
/php4/ext/wddx wddx.c
Log:
Be more safe about freeing zvals.
Index: php4/ext/wddx/wddx.c diff -u php4/ext/wddx/wddx.c:1.77 php4/ext/wddx/wddx.c:1.78 --- php4/ext/wddx/wddx.c:1.77 Mon Aug 6 09:36:08 2001 +++ php4/ext/wddx/wddx.c Tue Aug 14 16:33:19 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: wddx.c,v 1.77 2001/08/06 13:36:08 thies Exp $ */ +/* $Id: wddx.c,v 1.78 2001/08/14 20:33:19 andrei Exp $ */ #include "php.h" #include "php_wddx.h" @@ -86,7 +86,7 @@ static void php_wddx_process_data(void *user_data, const char *s, int len); -/* {{{ wddx_functions[] +/* wddx_functions[] */ function_entry wddx_functions[] = { PHP_FE(wddx_serialize_value, NULL) @@ -97,12 +97,12 @@ PHP_FE(wddx_deserialize, NULL) {NULL, NULL, NULL} }; -/* }}} */ +/* */ PHP_MINIT_FUNCTION(wddx); PHP_MINFO_FUNCTION(wddx); -/* {{{ wddx_module_entry +/* wddx_module_entry */ zend_module_entry wddx_module_entry = { "wddx", @@ -114,9 +114,9 @@ PHP_MINFO(wddx), STANDARD_MODULE_PROPERTIES }; -/* }}} */ +/* */ -/* {{{ wddx_stack_init +/* wddx_stack_init */ static int wddx_stack_init(wddx_stack *stack) { @@ -130,9 +130,9 @@ return SUCCESS; } } -/* }}} */ +/* */ -/* {{{ wddx_stack_push +/* wddx_stack_push */ static int wddx_stack_push(wddx_stack *stack, void *element, int size) { @@ -147,9 +147,9 @@ memcpy(stack->elements[stack->top], element, size); return stack->top++; } -/* }}} */ +/* */ -/* {{{ wddx_stack_top +/* wddx_stack_top */ static int wddx_stack_top(wddx_stack *stack, void **element) { @@ -161,9 +161,9 @@ return FAILURE; } } -/* }}} */ +/* */ -/* {{{ wddx_stack_is_empty +/* wddx_stack_is_empty */ static int wddx_stack_is_empty(wddx_stack *stack) { @@ -173,9 +173,9 @@ return 0; } } -/* }}} */ +/* */ -/* {{{ wddx_stack_destroy +/* wddx_stack_destroy */ static int wddx_stack_destroy(wddx_stack *stack) { @@ -185,8 +185,7 @@ for (i = 0; i < stack->top; i++) { if (((st_entry *)stack->elements[i])->data) { - zval_dtor(((st_entry *)stack->elements[i])->data); - efree(((st_entry *)stack->elements[i])->data); + zval_ptr_dtor(&((st_entry *)stack->elements[i])->data); } if (((st_entry *)stack->elements[i])->varname) efree(((st_entry *)stack->elements[i])->varname); @@ -196,9 +195,9 @@ } return SUCCESS; } -/* }}} */ +/* */ -/* {{{ release_wddx_packet_rsrc +/* release_wddx_packet_rsrc */ static void release_wddx_packet_rsrc(zend_rsrc_list_entry *rsrc TSRMLS_DC) { @@ -206,11 +205,11 @@ smart_str_free(str); efree(str); } -/* }}} */ +/* */ #include "ext/session/php_session.h" -/* {{{ PS_SERIALIZER_ENCODE_FUNC +/* PS_SERIALIZER_ENCODE_FUNC */ PS_SERIALIZER_ENCODE_FUNC(wddx) { @@ -238,9 +237,9 @@ return SUCCESS; } -/* }}} */ +/* */ -/* {{{ PS_SERIALIZER_DECODE_FUNC +/* PS_SERIALIZER_DECODE_FUNC */ PS_SERIALIZER_DECODE_FUNC(wddx) { @@ -281,9 +280,9 @@ return ret; } -/* }}} */ +/* */ -/* {{{ PHP_MINIT_FUNCTION +/* PHP_MINIT_FUNCTION */ PHP_MINIT_FUNCTION(wddx) { @@ -294,9 +293,9 @@ return SUCCESS; } -/* }}} */ +/* */ -/* {{{ PHP_MINFO_FUNCTION +/* PHP_MINFO_FUNCTION */ PHP_MINFO_FUNCTION(wddx) { @@ -304,9 +303,9 @@ php_info_print_table_row(2, "WDDX Support", "enabled" ); php_info_print_table_end(); } -/* }}} */ +/* */ -/* {{{ php_wddx_packet_start +/* php_wddx_packet_start */ void php_wddx_packet_start(wddx_packet *packet, char *comment, int comment_len) { @@ -321,16 +320,16 @@ php_wddx_add_chunk_static(packet, WDDX_HEADER); php_wddx_add_chunk_static(packet, WDDX_DATA_S); } -/* }}} */ +/* */ -/* {{{ php_wddx_packet_end +/* php_wddx_packet_end */ void php_wddx_packet_end(wddx_packet *packet) { php_wddx_add_chunk_static(packet, WDDX_DATA_E); php_wddx_add_chunk_static(packet, WDDX_PACKET_E); } -/* }}} */ +/* */ #define FLUSH_BUF() \ if (l > 0) { \ @@ -338,7 +337,7 @@ l = 0; \ } -/* {{{ php_wddx_serialize_string +/* php_wddx_serialize_string */ static void php_wddx_serialize_string(wddx_packet *packet, zval *var) { @@ -389,9 +388,9 @@ php_wddx_add_chunk_static(packet, WDDX_STRING_E); } -/* }}} */ +/* */ -/* {{{ php_wddx_serialize_number +/* php_wddx_serialize_number */ static void php_wddx_serialize_number(wddx_packet *packet, zval *var) { @@ -400,15 +399,16 @@ tmp = *var; zval_copy_ctor(&tmp); + INIT_PZVAL(&tmp); convert_to_string(&tmp); sprintf(tmp_buf, WDDX_NUMBER, Z_STRVAL(tmp)); zval_dtor(&tmp); php_wddx_add_chunk(packet, tmp_buf); } -/* }}} */ +/* */ -/* {{{ php_wddx_serialize_boolean +/* php_wddx_serialize_boolean */ static void php_wddx_serialize_boolean(wddx_packet *packet, zval *var) { @@ -417,17 +417,17 @@ sprintf(tmp_buf, WDDX_BOOLEAN, Z_LVAL_P(var) ? "true" : "false"); php_wddx_add_chunk(packet, tmp_buf); } -/* }}} */ +/* */ -/* {{{ php_wddx_serialize_unset +/* php_wddx_serialize_unset */ static void php_wddx_serialize_unset(wddx_packet *packet) { php_wddx_add_chunk_static(packet, WDDX_NULL); } -/* }}} */ +/* */ -/* {{{ php_wddx_serialize_object +/* php_wddx_serialize_object */ static void php_wddx_serialize_object(wddx_packet *packet, zval *obj) { @@ -446,7 +446,7 @@ * We try to call __sleep() method on object. It's supposed to return an * array of property names to be serialized. */ - if (call_user_function_ex(CG(function_table), &obj, fname, &retval, 0, 0, 1, NULL TSRMLS_CC) == SUCCESS) { + if (call_user_function_ex(EG(function_table), &obj, fname, &retval, 0, 0, 1, NULL TSRMLS_CC) == SUCCESS) { if (retval && HASH_OF(retval)) { PHP_CLASS_ATTRIBUTES; @@ -517,9 +517,9 @@ zval_ptr_dtor(&retval); } } -/* }}} */ +/* */ -/* {{{ php_wddx_serialize_array +/* php_wddx_serialize_array */ static void php_wddx_serialize_array(wddx_packet *packet, zval *arr) { @@ -586,9 +586,9 @@ php_wddx_add_chunk_static(packet, WDDX_ARRAY_E); } } -/* }}} */ +/* */ -/* {{{ php_wddx_serialize_var +/* php_wddx_serialize_var */ void php_wddx_serialize_var(wddx_packet *packet, zval *var, char *name, int name_len) { @@ -634,9 +634,9 @@ php_wddx_add_chunk_static(packet, WDDX_VAR_E); } } -/* }}} */ +/* */ -/* {{{ php_wddx_add_var +/* php_wddx_add_var */ static void php_wddx_add_var(wddx_packet *packet, zval *name_var) { @@ -664,9 +664,9 @@ } } } -/* }}} */ +/* */ -/* {{{ php_wddx_push_element +/* php_wddx_push_element */ static void php_wddx_push_element(void *user_data, const char *name, const char **atts) { @@ -772,9 +772,9 @@ } } } -/* }}} */ +/* */ -/* {{{ php_wddx_pop_element +/* php_wddx_pop_element */ static void php_wddx_pop_element(void *user_data, const char *name) { @@ -855,15 +855,13 @@ } /* Clean up old array entry */ - zval_dtor(ent2->data); - efree(ent2->data); + zval_ptr_dtor(&ent2->data); /* Set stack entry to point to the newly created object */ ent2->data = obj; /* Clean up class name var entry */ - zval_dtor(ent1->data); - efree(ent1->data); + zval_ptr_dtor(&ent1->data); } else zend_hash_update(target_hash, @@ -882,9 +880,9 @@ efree(stack->varname); } } -/* }}} */ +/* */ -/* {{{ php_wddx_process_data +/* php_wddx_process_data */ static void php_wddx_process_data(void *user_data, const char *s, int len) { @@ -939,8 +937,7 @@ Z_LVAL_P(ent->data) = 0; else { stack->top--; - zval_dtor(ent->data); - efree(ent->data); + zval_ptr_dtor(&ent->data); if (ent->varname) efree(ent->varname); efree(ent); @@ -952,9 +949,9 @@ } } } -/* }}} */ +/* */ -/* {{{ php_wddx_deserialize_ex +/* php_wddx_deserialize_ex */ int php_wddx_deserialize_ex(char *value, int vallen, zval *return_value) { @@ -986,9 +983,9 @@ return retval; } -/* }}} */ +/* */ -/* {{{ proto string wddx_serialize_value(mixed var [, string comment]) +/* proto string wddx_serialize_value(mixed var [, string comment]) Creates a new packet and serializes the given value */ PHP_FUNCTION(wddx_serialize_value) { @@ -1014,9 +1011,9 @@ smart_str_free(packet); efree(packet); } -/* }}} */ +/* */ -/* {{{ proto string wddx_serialize_vars(mixed var_name [, mixed ...]) +/* proto string wddx_serialize_vars(mixed var_name [, mixed ...]) Creates a new packet and serializes given variables into a struct */ PHP_FUNCTION(wddx_serialize_vars) { @@ -1061,9 +1058,9 @@ smart_str_free(packet); efree(packet); } -/* }}} */ +/* */ -/* {{{ php_wddx_constructor +/* php_wddx_constructor */ wddx_packet *php_wddx_constructor(void) { @@ -1074,18 +1071,18 @@ return packet; } -/* }}} */ +/* */ -/* {{{ php_wddx_destructor +/* php_wddx_destructor */ void php_wddx_destructor(wddx_packet *packet) { smart_str_free(packet); efree(packet); } -/* }}} */ +/* */ -/* {{{ proto int wddx_packet_start([string comment]) +/* proto int wddx_packet_start([string comment]) Starts a WDDX packet with optional comment and returns the packet id */ PHP_FUNCTION(wddx_packet_start) { @@ -1108,9 +1105,9 @@ ZEND_REGISTER_RESOURCE(return_value, packet, le_wddx); } -/* }}} */ +/* */ -/* {{{ proto string wddx_packet_end(int packet_id) +/* proto string wddx_packet_end(int packet_id) Ends specified WDDX packet and returns the string containing the packet */ PHP_FUNCTION(wddx_packet_end) { @@ -1130,9 +1127,9 @@ zend_list_delete(Z_LVAL_P(packet_id)); } -/* }}} */ +/* */ -/* {{{ proto int wddx_add_vars(int packet_id, mixed var_names [, mixed ...]) +/* proto int wddx_add_vars(int packet_id, mixed var_names [, mixed ...]) Serializes given variables and adds them to packet given by packet_id */ PHP_FUNCTION(wddx_add_vars) { @@ -1173,9 +1170,9 @@ efree(args); RETURN_TRUE; } -/* }}} */ +/* */ -/* {{{ proto mixed wddx_deserialize(string packet) +/* proto mixed wddx_deserialize(string packet) Deserializes given packet and returns a PHP value */ PHP_FUNCTION(wddx_deserialize) { @@ -1190,7 +1187,7 @@ php_wddx_deserialize_ex(packet, packet_len, return_value); } -/* }}} */ +/* */ #endif /* HAVE_LIBEXPAT */
Index: php4/ext/wddx/wddx.c diff -u php4/ext/wddx/wddx.c:1.77 php4/ext/wddx/wddx.c:1.78 --- php4/ext/wddx/wddx.c:1.77 Mon Aug 6 09:36:08 2001 +++ php4/ext/wddx/wddx.c Tue Aug 14 16:33:19 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: wddx.c,v 1.77 2001/08/06 13:36:08 thies Exp $ */ +/* $Id: wddx.c,v 1.78 2001/08/14 20:33:19 andrei Exp $ */ #include "php.h" #include "php_wddx.h" @@ -86,7 +86,7 @@ static void php_wddx_process_data(void *user_data, const char *s, int len); -/* {{{ wddx_functions[] +/* wddx_functions[] */ function_entry wddx_functions[] = { PHP_FE(wddx_serialize_value, NULL) @@ -97,12 +97,12 @@ PHP_FE(wddx_deserialize, NULL) {NULL, NULL, NULL} }; -/* }}} */ +/* */ PHP_MINIT_FUNCTION(wddx); PHP_MINFO_FUNCTION(wddx); -/* {{{ wddx_module_entry +/* wddx_module_entry */ zend_module_entry wddx_module_entry = { "wddx", @@ -114,9 +114,9 @@ PHP_MINFO(wddx), STANDARD_MODULE_PROPERTIES }; -/* }}} */ +/* */ -/* {{{ wddx_stack_init +/* wddx_stack_init */ static int wddx_stack_init(wddx_stack *stack) { @@ -130,9 +130,9 @@ return SUCCESS; } } -/* }}} */ +/* */ -/* {{{ wddx_stack_push +/* wddx_stack_push */ static int wddx_stack_push(wddx_stack *stack, void *element, int size) { @@ -147,9 +147,9 @@ memcpy(stack->elements[stack->top], element, size); return stack->top++; } -/* }}} */ +/* */ -/* {{{ wddx_stack_top +/* wddx_stack_top */ static int wddx_stack_top(wddx_stack *stack, void **element) { @@ -161,9 +161,9 @@ return FAILURE; } } -/* }}} */ +/* */ -/* {{{ wddx_stack_is_empty +/* wddx_stack_is_empty */ static int wddx_stack_is_empty(wddx_stack *stack) { @@ -173,9 +173,9 @@ return 0; } } -/* }}} */ +/* */ -/* {{{ wddx_stack_destroy +/* wddx_stack_destroy */ static int wddx_stack_destroy(wddx_stack *stack) { @@ -185,8 +185,7 @@ for (i = 0; i < stack->top; i++) { if (((st_entry *)stack->elements[i])->data) { - zval_dtor(((st_entry *)stack->elements[i])->data); - efree(((st_entry *)stack->elements[i])->data); + zval_ptr_dtor(&((st_entry *)stack->elements[i])->data); } if (((st_entry *)stack->elements[i])->varname) efree(((st_entry *)stack->elements[i])->varname); @@ -196,9 +195,9 @@ } return SUCCESS; } -/* }}} */ +/* */ -/* {{{ release_wddx_packet_rsrc +/* release_wddx_packet_rsrc */ static void release_wddx_packet_rsrc(zend_rsrc_list_entry *rsrc TSRMLS_DC) { @@ -206,11 +205,11 @@ smart_str_free(str); efree(str); } -/* }}} */ +/* */ #include "ext/session/php_session.h" -/* {{{ PS_SERIALIZER_ENCODE_FUNC +/* PS_SERIALIZER_ENCODE_FUNC */ PS_SERIALIZER_ENCODE_FUNC(wddx) { @@ -238,9 +237,9 @@ return SUCCESS; } -/* }}} */ +/* */ -/* {{{ PS_SERIALIZER_DECODE_FUNC +/* PS_SERIALIZER_DECODE_FUNC */ PS_SERIALIZER_DECODE_FUNC(wddx) { @@ -281,9 +280,9 @@ return ret; } -/* }}} */ +/* */ -/* {{{ PHP_MINIT_FUNCTION +/* PHP_MINIT_FUNCTION */ PHP_MINIT_FUNCTION(wddx) { @@ -294,9 +293,9 @@ return SUCCESS; } -/* }}} */ +/* */ -/* {{{ PHP_MINFO_FUNCTION +/* PHP_MINFO_FUNCTION */ PHP_MINFO_FUNCTION(wddx) { @@ -304,9 +303,9 @@ php_info_print_table_row(2, "WDDX Support", "enabled" ); php_info_print_table_end(); } -/* }}} */ +/* */ -/* {{{ php_wddx_packet_start +/* php_wddx_packet_start */ void php_wddx_packet_start(wddx_packet *packet, char *comment, int comment_len) { @@ -321,16 +320,16 @@ php_wddx_add_chunk_static(packet, WDDX_HEADER); php_wddx_add_chunk_static(packet, WDDX_DATA_S); } -/* }}} */ +/* */ -/* {{{ php_wddx_packet_end +/* php_wddx_packet_end */ void php_wddx_packet_end(wddx_packet *packet) { php_wddx_add_chunk_static(packet, WDDX_DATA_E); php_wddx_add_chunk_static(packet, WDDX_PACKET_E); } -/* }}} */ +/* */ #define FLUSH_BUF() \ if (l > 0) { \ @@ -338,7 +337,7 @@ l = 0; \ } -/* {{{ php_wddx_serialize_string +/* php_wddx_serialize_string */ static void php_wddx_serialize_string(wddx_packet *packet, zval *var) { @@ -389,9 +388,9 @@ php_wddx_add_chunk_static(packet, WDDX_STRING_E); } -/* }}} */ +/* */ -/* {{{ php_wddx_serialize_number +/* php_wddx_serialize_number */ static void php_wddx_serialize_number(wddx_packet *packet, zval *var) { @@ -400,15 +399,16 @@ tmp = *var; zval_copy_ctor(&tmp); + INIT_PZVAL(&tmp); convert_to_string(&tmp); sprintf(tmp_buf, WDDX_NUMBER, Z_STRVAL(tmp)); zval_dtor(&tmp); php_wddx_add_chunk(packet, tmp_buf); } -/* }}} */ +/* */ -/* {{{ php_wddx_serialize_boolean +/* php_wddx_serialize_boolean */ static void php_wddx_serialize_boolean(wddx_packet *packet, zval *var) { @@ -417,17 +417,17 @@ sprintf(tmp_buf, WDDX_BOOLEAN, Z_LVAL_P(var) ? "true" : "false"); php_wddx_add_chunk(packet, tmp_buf); } -/* }}} */ +/* */ -/* {{{ php_wddx_serialize_unset +/* php_wddx_serialize_unset */ static void php_wddx_serialize_unset(wddx_packet *packet) { php_wddx_add_chunk_static(packet, WDDX_NULL); } -/* }}} */ +/* */ -/* {{{ php_wddx_serialize_object +/* php_wddx_serialize_object */ static void php_wddx_serialize_object(wddx_packet *packet, zval *obj) { @@ -446,7 +446,7 @@ * We try to call __sleep() method on object. It's supposed to return an * array of property names to be serialized. */ - if (call_user_function_ex(CG(function_table), &obj, fname, &retval, 0, 0, 1, NULL TSRMLS_CC) == SUCCESS) { + if (call_user_function_ex(EG(function_table), &obj, fname, &retval, 0, 0, 1, NULL TSRMLS_CC) == SUCCESS) { if (retval && HASH_OF(retval)) { PHP_CLASS_ATTRIBUTES; @@ -517,9 +517,9 @@ zval_ptr_dtor(&retval); } } -/* }}} */ +/* */ -/* {{{ php_wddx_serialize_array +/* php_wddx_serialize_array */ static void php_wddx_serialize_array(wddx_packet *packet, zval *arr) { @@ -586,9 +586,9 @@ php_wddx_add_chunk_static(packet, WDDX_ARRAY_E); } } -/* }}} */ +/* */ -/* {{{ php_wddx_serialize_var +/* php_wddx_serialize_var */ void php_wddx_serialize_var(wddx_packet *packet, zval *var, char *name, int name_len) { @@ -634,9 +634,9 @@ php_wddx_add_chunk_static(packet, WDDX_VAR_E); } } -/* }}} */ +/* */ -/* {{{ php_wddx_add_var +/* php_wddx_add_var */ static void php_wddx_add_var(wddx_packet *packet, zval *name_var) { @@ -664,9 +664,9 @@ } } } -/* }}} */ +/* */ -/* {{{ php_wddx_push_element +/* php_wddx_push_element */ static void php_wddx_push_element(void *user_data, const char *name, const char **atts) { @@ -772,9 +772,9 @@ } } } -/* }}} */ +/* */ -/* {{{ php_wddx_pop_element +/* php_wddx_pop_element */ static void php_wddx_pop_element(void *user_data, const char *name) { @@ -855,15 +855,13 @@ } /* Clean up old array entry */ - zval_dtor(ent2->data); - efree(ent2->data); + zval_ptr_dtor(&ent2->data); /* Set stack entry to point to the newly created object */ ent2->data = obj; /* Clean up class name var entry */ - zval_dtor(ent1->data); - efree(ent1->data); + zval_ptr_dtor(&ent1->data); } else zend_hash_update(target_hash, @@ -882,9 +880,9 @@ efree(stack->varname); } } -/* }}} */ +/* */ -/* {{{ php_wddx_process_data +/* php_wddx_process_data */ static void php_wddx_process_data(void *user_data, const char *s, int len) { @@ -939,8 +937,7 @@ Z_LVAL_P(ent->data) = 0; else { stack->top--; - zval_dtor(ent->data); - efree(ent->data); + zval_ptr_dtor(&ent->data); if (ent->varname) efree(ent->varname); efree(ent); @@ -952,9 +949,9 @@ } } } -/* }}} */ +/* */ -/* {{{ php_wddx_deserialize_ex +/* php_wddx_deserialize_ex */ int php_wddx_deserialize_ex(char *value, int vallen, zval *return_value) { @@ -986,9 +983,9 @@ return retval; } -/* }}} */ +/* */ -/* {{{ proto string wddx_serialize_value(mixed var [, string comment]) +/* proto string wddx_serialize_value(mixed var [, string comment]) Creates a new packet and serializes the given value */ PHP_FUNCTION(wddx_serialize_value) { @@ -1014,9 +1011,9 @@ smart_str_free(packet); efree(packet); } -/* }}} */ +/* */ -/* {{{ proto string wddx_serialize_vars(mixed var_name [, mixed ...]) +/* proto string wddx_serialize_vars(mixed var_name [, mixed ...]) Creates a new packet and serializes given variables into a struct */ PHP_FUNCTION(wddx_serialize_vars) { @@ -1061,9 +1058,9 @@ smart_str_free(packet); efree(packet); } -/* }}} */ +/* */ -/* {{{ php_wddx_constructor +/* php_wddx_constructor */ wddx_packet *php_wddx_constructor(void) { @@ -1074,18 +1071,18 @@ return packet; } -/* }}} */ +/* */ -/* {{{ php_wddx_destructor +/* php_wddx_destructor */ void php_wddx_destructor(wddx_packet *packet) { smart_str_free(packet); efree(packet); } -/* }}} */ +/* */ -/* {{{ proto int wddx_packet_start([string comment]) +/* proto int wddx_packet_start([string comment]) Starts a WDDX packet with optional comment and returns the packet id */ PHP_FUNCTION(wddx_packet_start) { @@ -1108,9 +1105,9 @@ ZEND_REGISTER_RESOURCE(return_value, packet, le_wddx); } -/* }}} */ +/* */ -/* {{{ proto string wddx_packet_end(int packet_id) +/* proto string wddx_packet_end(int packet_id) Ends specified WDDX packet and returns the string containing the packet */ PHP_FUNCTION(wddx_packet_end) { @@ -1130,9 +1127,9 @@ zend_list_delete(Z_LVAL_P(packet_id)); } -/* }}} */ +/* */ -/* {{{ proto int wddx_add_vars(int packet_id, mixed var_names [, mixed ...]) +/* proto int wddx_add_vars(int packet_id, mixed var_names [, mixed ...]) Serializes given variables and adds them to packet given by packet_id */ PHP_FUNCTION(wddx_add_vars) { @@ -1173,9 +1170,9 @@ efree(args); RETURN_TRUE; } -/* }}} */ +/* */ -/* {{{ proto mixed wddx_deserialize(string packet) +/* proto mixed wddx_deserialize(string packet) Deserializes given packet and returns a PHP value */ PHP_FUNCTION(wddx_deserialize) { @@ -1190,7 +1187,7 @@ php_wddx_deserialize_ex(packet, packet_len, return_value); } -/* }}} */ +/* */ #endif /* HAVE_LIBEXPAT */