pike.git / src / operators.c

version» Context lines:

pike.git/src/operators.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: operators.c,v 1.213 2006/08/21 18:14:05 grubba Exp $ + || $Id: operators.c,v 1.214 2006/08/21 18:28:18 grubba Exp $   */      #include "global.h"   #include <math.h>   #include "interpret.h"   #include "svalue.h"   #include "multiset.h"   #include "mapping.h"   #include "array.h"   #include "stralloc.h"
pike.git/src/operators.c:921:    if (!low_check_soft_cast(s, type->car)) return 0;    type = type->cdr;    goto loop;    case T_OR:    if (low_check_soft_cast(s, type->car)) return 1;    type = type->cdr;    goto loop;    case T_NOT:    return !low_check_soft_cast(s, type->car);    } +  if ((s->type == PIKE_T_INT) && !s->u.integer) return 1;    if (s->type == type->type) { -  if (type->type == PIKE_T_INT) return 1; +  if (type->type == PIKE_T_INT) return 1; /* FIXME: Check range. */    if (type->type == PIKE_T_FLOAT) return 1;    if (type->type == PIKE_T_STRING) return 1;    switch(type->type) {    case PIKE_T_OBJECT:    {    struct program *p;    /* Common cases. */    if (!type->cdr) return 1;    if (s->u.object->prog->id == CDR_TO_INT(type)) return 1;    p = id_to_program(CDR_TO_INT(type));