pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:2865:       case T_MULTISET:    if(t->car && (t->car->type != T_MIXED)) {    string_builder_sprintf(s, "multiset(%T)", t->car);    } else {    string_builder_strcat(s, "multiset");    }    break;       case T_NOT: -  if (t->car->type > T_NOT) { +  if (t->car && (t->car->type > T_NOT)) {    string_builder_sprintf(s, "!(%T)", t->car);    } else {    string_builder_sprintf(s, "!%T", t->car);    }    break;       case PIKE_T_RING:    /* FIXME: Should be renumbered for correct parenthesing. */    string_builder_sprintf(s, "(%T)\260(%T)", t->car, t->cdr);    break;       case T_OR: -  if (t->car->type > T_OR) { +  if (t->car && (t->car->type > T_OR)) {    string_builder_sprintf(s, "(%T)", t->car);    } else {    low_describe_type(s, t->car);    }    string_builder_strcat(s, " | "); -  if (t->cdr->type > T_OR) { +  if (t->cdr && (t->cdr->type > T_OR)) {    string_builder_sprintf(s, "(%T)", t->cdr);    } else {    low_describe_type(s, t->cdr);    }    break;       case T_AND: -  if (t->car->type > T_AND) { +  if (t->car && (t->car->type > T_AND)) {    string_builder_sprintf(s, "(%T)", t->car);    } else {    low_describe_type(s, t->car);    }    string_builder_strcat(s, " & "); -  if (t->cdr->type > T_AND) { +  if (t->cdr && (t->cdr->type > T_AND)) {    string_builder_sprintf(s, "(%T)", t->cdr);    } else {    low_describe_type(s, t->cdr);    }    break;       case T_MAPPING: -  if(t->car->type != T_MIXED || t->cdr->type != T_MIXED) { +  if((t->car && (t->car->type != T_MIXED)) || +  (t->cdr && (t->cdr->type != T_MIXED))) {    string_builder_sprintf(s, "mapping(%T:%T)", t->car, t->cdr);    } else {    string_builder_strcat(s, "mapping");    }    break; -  +     case PIKE_T_AUTO: -  if (t->car->type != T_ZERO) { +  if (t->car && (t->car->type != T_ZERO)) {    string_builder_sprintf(s, "auto(%T)", t->car);    } else {    string_builder_strcat(s, "auto");    }    break;       case PIKE_T_FIND_LFUN:    string_builder_sprintf(s, "find_lfun(%T, \"%S\")",    t->car, lfun_strings[CDR_TO_INT(t)]);    break;