Re: cvs: php-src(PHP_4_3) /ext/session session.c
| From: | Sascha Schumann | Date: | Tue, 22 Jul 2003 10:49:56 +0000 |
| Subject: | Re: cvs: php-src(PHP_4_3) /ext/session session.c | ||
| References: | 1 2 3 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-22710@lists.php.net to get a copy of this message | ||
On Tue, 22 Jul 2003, Zeev Suraski wrote:
> At 12:22 22/07/2003, Sascha Schumann wrote:
> > If it is not irregular, the engine code should be able to
> > deal with it correctly. Right now, it falls over itself
> > quickly and dies ungracefully.
>
> Then ZEND_SET_SYMBOL_WITH_LENGTH should be fixed. I'm not sure who wrote
> it, but it wasn't Andi nor me. The engine works with it properly, more
> than that, it completely relies on this behavior.
Btw, here is the annotated source code.
1.33 (andi 03-Dec-99): #define ZEND_SET_SYMBOL_WITH_LENGTH(symtable, name, name_length,
var, _refcount, _is_ref)
1.18 (zeev 30-Jul-99): {
1.18 (zeev 30-Jul-99): zval **orig_var;
1.18 (zeev 30-Jul-99):
1.19 (zeev 30-Jul-99): if (zend_hash_find(symtable, (name), (name_length),
(void **) &orig_var)==SUCCESS
1.18 (zeev 30-Jul-99): && PZVAL_IS_REF(*orig_var)) {
1.30 (zeev 01-Dec-99): (var)->refcount =
(*orig_var)->refcount;
1.28 (andrei 18-Oct-99): (var)->is_ref = 1;
1.18 (zeev 30-Jul-99):
1.31 (zeev 01-Dec-99): if (_refcount) {
1.31 (zeev 01-Dec-99): (var)->refcount += _refcount-1;
1.31 (zeev 01-Dec-99): }
1.18 (zeev 30-Jul-99): zval_dtor(*orig_var);
1.30 (zeev 01-Dec-99): **orig_var = *(var);
1.44 (andi 24-Dec-99): FREE_ZVAL(var);
1.18 (zeev 30-Jul-99): } else {
1.32 (andi 02-Dec-99): (var)->is_ref = _is_ref;
1.30 (zeev 01-Dec-99): if (_refcount) {
1.30 (zeev 01-Dec-99): (var)->refcount = _refcount;
1.30 (zeev 01-Dec-99): }
1.30 (zeev 01-Dec-99): zend_hash_update(symtable, (name),
(name_length), &(var), sizeof(zval *), NULL);
1.18 (zeev 30-Jul-99): }
1.18 (zeev 30-Jul-99): }
- Sascha