cvs: /php4 ChangeLog /php4/ext/standard var.c
| From: | Thies C . Arntzen | Date: | Wed, 15 Sep 1999 11:42:28 +0000 |
| Subject: | cvs: /php4 ChangeLog /php4/ext/standard var.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-4478@lists.php.net to get a copy of this message | ||
thies Wed Sep 15 07:42:28 1999 EDT
Modified files:
/php4 ChangeLog
/php4/ext/standard var.c
Log:
use new API in var.c
Index: php4/ChangeLog
diff -u php4/ChangeLog:1.106 php4/ChangeLog:1.107
--- php4/ChangeLog:1.106 Wed Sep 15 07:08:24 1999
+++ php4/ChangeLog Wed Sep 15 07:42:27 1999
@@ -2,8 +2,8 @@
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ?? 1999, Version 4.0 Beta 3
-- Made serialize/unserialize work on classes. CAUTION: when unserializing the
- class to be unserialized needs to be known! (Thies)
+- Made serialize/unserialize work on classes & speedups. CAUTION: when
+ unserializing the class to be unserialized needs to be known! (Thies)
- Reworked preg_* functions according to the new PCRE API, which also made
them behave much more like Perl ones (Andrey)
- Made it possible to specify external location of PCRE library (Andrey)
Index: php4/ext/standard/var.c
diff -u php4/ext/standard/var.c:1.22 php4/ext/standard/var.c:1.23
--- php4/ext/standard/var.c:1.22 Wed Sep 15 07:09:32 1999
+++ php4/ext/standard/var.c Wed Sep 15 07:42:28 1999
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: var.c,v 1.22 1999/09/15 11:09:32 thies Exp $ */
+/* $Id: var.c,v 1.23 1999/09/15 11:42:28 thies Exp $ */
/* {{{ includes
@@ -431,17 +431,16 @@
/* {{{ proto string serialize(mixed variable)
Returns a string representation of variable (which can later be unserialized) */
PHP_FUNCTION(serialize)
-
{
- pval *struc;
+ pval **struc;
- if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &struc) == FAILURE) {
+ if (ARG_COUNT(ht) != 1 || getParametersEx(1, &struc) == FAILURE) {
WRONG_PARAM_COUNT;
}
return_value->type = IS_STRING;
return_value->value.str.val = NULL;
return_value->value.str.len = 0;
- php3api_var_serialize(return_value, &struc);
+ php3api_var_serialize(return_value, struc);
}
/* }}} */
@@ -451,14 +450,15 @@
PHP_FUNCTION(unserialize)
{
- pval *buf;
+ pval **buf;
- if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &buf) == FAILURE) {
+ if (ARG_COUNT(ht) != 1 || getParametersEx(1, &buf) == FAILURE) {
WRONG_PARAM_COUNT;
}
- if (buf->type == IS_STRING) {
- const char *p = buf->value.str.val;
- if (!php3api_var_unserialize(&return_value, &p, p + buf->value.str.len)) {
+ if ((*buf)->type == IS_STRING) {
+ const char *p = (*buf)->value.str.val;
+
+ if (!php3api_var_unserialize(&return_value, &p, p + (*buf)->value.str.len)) {
RETURN_FALSE;
}
} else {