cvs: Zend / zend_operators.c

From: Date: Sun, 14 Jul 2002 09:35:38 +0000
Subject: cvs: Zend / zend_operators.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-245@lists.php.net to get a copy of this message
derick Sun Jul 14 05:35:38 2002 EDT Modified files: /Zend zend_operators.c Log: - Now implement is as documented: considered TRUE, like any other non-zero (whether negative or positive) number! This means that FALSE++ = TRUE and TRUE++ is still TRUE. Same for FALSE-- = TRUE and TRUE-- = FALSE; Index: Zend/zend_operators.c diff -u Zend/zend_operators.c:1.119 Zend/zend_operators.c:1.120 --- Zend/zend_operators.c:1.119 Sun Jul 14 05:26:41 2002 +++ Zend/zend_operators.c Sun Jul 14 05:35:38 2002 @@ -1443,10 +1443,9 @@ { switch (op1->type) { case IS_BOOL: - if (op1->value.lval) { - op1->type = IS_LONG; + if (!op->value.lval) { + op1->value.lval = 1; } - op1->value.lval++; break; case IS_LONG: if(op1->value.lval == LONG_MAX) { @@ -1511,10 +1510,11 @@ switch (op1->type) { case IS_BOOL: - if (!op1->value.lval) { - op1->type = IS_LONG; + if (op->value.lval) { + op1->value.lval = 0; + } else { + op1->value.lval = 1; } - op1->value.lval--; break; case IS_LONG: if(op1->value.lval == LONG_MIN) {

« previous php.zend-engine.cvs (#245) next »