From c31faf0bd993d7be5de8599c56e91e8b5bc165bd Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Mon, 30 Oct 2000 17:10:06 +0000 Subject: Add support for serializing references. @- Add support for serializing references (Stas) # WDDX and shared memory functions not covered yet --- ext/standard/php_var.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'ext/standard/php_var.h') diff --git a/ext/standard/php_var.h b/ext/standard/php_var.h index 71ca6f3c8f..8ce3316e2b 100644 --- a/ext/standard/php_var.h +++ b/ext/standard/php_var.h @@ -26,8 +26,22 @@ PHP_FUNCTION(serialize); PHP_FUNCTION(unserialize); void php_var_dump(pval **struc, int level); -void php_var_serialize(pval *buf, pval **struc); -int php_var_unserialize(pval **rval, const char **p, const char *max); + +/* typdef HashTable php_serialize_data_t; */ +#define php_serialize_data_t HashTable + +void php_var_serialize(pval *buf, pval **struc, php_serialize_data_t *var_hash); +int php_var_unserialize(pval **rval, const char **p, const char *max, php_serialize_data_t *var_hash); + +#define PHP_VAR_SERIALIZE_INIT(var_hash) \ + zend_hash_init(&(var_hash),10,NULL,NULL,0) +#define PHP_VAR_SERIALIZE_DESTROY(var_hash) \ + zend_hash_destroy(&(var_hash)) + +#define PHP_VAR_UNSERIALIZE_INIT(var_hash) \ + zend_hash_init(&(var_hash),10,NULL,NULL,0) +#define PHP_VAR_UNSERIALIZE_DESTROY(var_hash) \ + zend_hash_destroy(&(var_hash)) PHPAPI zend_class_entry *php_create_empty_class(char *class_name,int len); -- cgit v1.2.1