Re: assert module

From: Date: Tue, 07 Dec 1999 14:35:00 +0000
Subject: Re: assert module
Groups: php.version4 
Request: Send a blank email to php-version4+get-7599@lists.php.net to get a copy of this message
>> if ((*assertion)->type == IS_STRING) { zval retval; myeval = (*assertion)->value.str.val; zend_eval_string(myeval, &retval CLS_CC ELS_CC); convert_to_boolean(&retval); val = retval.value.lval; } else { convert_to_boolean_ex(assertion); val = (*assertion)->value.lval; } >> I am not sure I agree with this code. assert() function should only receive a boolean result (or convert something to boolean if it's not). What is the purpose of passing a string in? -Andrei "In My Egotistical Opinion, most people's C programs should be indented six feet downward and covered with dirt." -- Blair P. Houghton

« previous php.version4 (#7599) next »