pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:9133:    }       switch(low_check_indexing(t, index_type, n))    {    case 0: return 0;    case -1:    add_ref(zero_type_string);    return zero_type_string;    }    -  while((t->type == PIKE_T_NAME) || +  while(t && +  ((t->type == PIKE_T_NAME) ||    (t->type == PIKE_T_ATTRIBUTE) ||    (t->type == T_ASSIGN) || -  (t->type == T_SCOPE)) { +  (t->type == T_SCOPE))) {    t = t->cdr;    } -  +  if (!t) { +  add_ref(mixed_type_string); +  return mixed_type_string; +  }    while((index_type->type == PIKE_T_NAME) ||    (index_type->type == PIKE_T_ATTRIBUTE) ||    (index_type->type == T_ASSIGN) ||    (index_type->type == T_SCOPE)) {    index_type = index_type->cdr;    }       switch(t->type)    {    case T_OBJECT:
pike.git/src/pike_types.cmod:9677:      /* Returns whether a value of type 'type' may be indexed with a value    * of type 'index_type'. Returns -1 if the indexing operation is valid,    * but will always fail.    * The node 'n' is the node with the indexing operator.    */   static int low_check_indexing(struct pike_type *type,    struct pike_type *index_type,    node *n)   { +  if (!type) return 1;    switch(type->type)    {    case T_OR:    return low_check_indexing(type->car, index_type, n) ||    low_check_indexing(type->cdr, index_type, n);       case T_AND:    return low_check_indexing(type->car, index_type, n) &&    low_check_indexing(type->cdr, index_type, n);