pike.git / src / array.c

version» Context lines:

pike.git/src/array.c:16:   #include "pike_types.h"   #include "fsort.h"   #include "builtin_functions.h"   #include "pike_memory.h"   #include "gc.h"   #include "main.h"   #include "security.h"   #include "stuff.h"   #include "bignum.h"    - RCSID("$Id: array.c,v 1.120 2001/10/15 09:20:58 mast Exp $"); + RCSID("$Id: array.c,v 1.121 2001/12/16 02:49:36 mast Exp $");      PMOD_EXPORT struct array empty_array=   {    PIKE_CONSTANT_MEMOBJ_INIT(1), /* Never free */    &weak_empty_array, /* Next */    &weak_shrink_empty_array, /* previous (circular) */    0, /* Size = 0 */    0, /* malloced Size = 0 */    0, /* no types */    0, /* no flags */
pike.git/src/array.c:455:    check_destructed(s);      #ifdef PIKE_DEBUG    if(d_flag > 1) array_check_type_field(v);   #endif    /* Why search for something that is not there?    * however, we must explicitly check for searches    * for destructed objects/functions    */    if((v->type_field & (1 << s->type)) || -  (IS_ZERO(s) && (v->type_field & (BIT_FUNCTION|BIT_OBJECT))) || +  (UNSAFE_IS_ZERO(s) && (v->type_field & (BIT_FUNCTION|BIT_OBJECT))) ||    ( (v->type_field | (1<<s->type)) & BIT_OBJECT )) /* for overloading */    {    if(start)    {    for(e=start;e<v->size;e++)    if(is_eq(ITEM(v)+e,s)) return e;    }else{    TYPE_FIELD t=0;    for(e=0;e<v->size;e++)    {
pike.git/src/array.c:732:    break;    }    }else{    def=a->type - b->type;    }       if (a->type == T_OBJECT && a->u.object->prog) {    if (FIND_LFUN(a->u.object->prog,LFUN_LT) != -1) {    push_svalue(b);    apply_lfun(a->u.object,LFUN_LT,1); -  if(!IS_ZERO(sp-1)) +  if(!UNSAFE_IS_ZERO(sp-1))    {    pop_stack();    return -1;    }    pop_stack();    }    if (FIND_LFUN(a->u.object->prog,LFUN_GT) != -1) {    push_svalue(b);    apply_lfun(a->u.object,LFUN_GT,1); -  if(!IS_ZERO(sp-1)) +  if(!UNSAFE_IS_ZERO(sp-1))    {    pop_stack();    return 1;    }    pop_stack();    }    if (FIND_LFUN(a->u.object->prog,LFUN_EQ) != -1) {    push_svalue(b);    apply_lfun(a->u.object,LFUN_EQ,1); -  if (!IS_ZERO(sp-1)) { +  if (!UNSAFE_IS_ZERO(sp-1)) {    pop_stack();    return 0;    }    pop_stack();    }    }    if(b->type == T_OBJECT && b->u.object->prog) {    if (FIND_LFUN(b->u.object->prog,LFUN_LT) != -1) {    push_svalue(a);    apply_lfun(b->u.object,LFUN_LT,1); -  if(!IS_ZERO(sp-1)) +  if(!UNSAFE_IS_ZERO(sp-1))    {    pop_stack();    return 1;    }    pop_stack();    }    if (FIND_LFUN(b->u.object->prog,LFUN_GT) != -1) {    push_svalue(a);    apply_lfun(b->u.object,LFUN_GT,1); -  if(!IS_ZERO(sp-1)) +  if(!UNSAFE_IS_ZERO(sp-1))    {    pop_stack();    return -1;    }    pop_stack();    }    if (FIND_LFUN(b->u.object->prog,LFUN_EQ) != -1) {    push_svalue(a);    apply_lfun(b->u.object,LFUN_EQ,1); -  if (!IS_ZERO(sp-1)) { +  if (!UNSAFE_IS_ZERO(sp-1)) {    pop_stack();    return 0;    }    pop_stack();    }    }       return def;   }