pike.git
/
src
/
operators.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/operators.c:1968:
if(count_args(CDR(n))==2) { first_arg=my_get_arg(&_CDR(n), 0); second_arg=my_get_arg(&_CDR(n), 1); #ifdef PIKE_DEBUG if(!first_arg || !second_arg) Pike_fatal("Couldn't find argument!\n"); #endif
-
#if 0
-
/* Disabled these - boolean falsehood is not the same thing as
-
* equality with the integer 0. */
-
-
if(node_is_false(*first_arg) && !node_may_overload(*second_arg,LFUN_EQ))
-
{
-
ret=*second_arg;
-
ADD_NODE_REF(*second_arg);
-
return mkopernode("`!",ret,0);
-
}
-
-
if(node_is_false(*second_arg) && !node_may_overload(*first_arg,LFUN_EQ))
-
{
-
ret=*first_arg;
-
ADD_NODE_REF(*first_arg);
-
return mkopernode("`!",ret,0);
-
}
-
#endif
-
+
if (((*second_arg)->token == F_CONSTANT) && (TYPEOF((*second_arg)->u.sval) == T_STRING) && ((*first_arg)->token == F_RANGE)) { node *low = CADR (*first_arg), *high = CDDR (*first_arg); INT_TYPE c; if ((low->token == F_RANGE_OPEN || (low->token == F_RANGE_FROM_BEG && (CAR (low)->token == F_CONSTANT) && (TYPEOF(CAR (low)->u.sval) == T_INT) && (!(CAR (low)->u.sval.u.integer)))) &&