pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:1206:    * On the other hand, the iterator should be false now.    */    push_undefined();    return;    }    pop_n_elems(2);    }    }    }    } -  /* FALL_THROUGH */ +  /* FALLTHRU */    default:    SIMPLE_ARG_TYPE_ERROR("search", 1, "string|array|mapping|object");    }   }      /*! @decl int has_prefix(string|object s, string prefix)    *!    *! Returns @expr{1@} if the string @[s] starts with @[prefix],    *! returns @expr{0@} (zero) otherwise.    *!
pike.git/src/builtin_functions.c:1538:    /* FIXME: It's very sad that we always have to do linear search    with `values' in case of objects. The problem is that we cannot    use `search' directly since it's undefined whether it returns    -1 (array) or 0 (mapping) during e.g. some data type emulation.       Maybe we should use object->_has_value(value) provided that    the object implements it.       /Noring */    -  /* FALL_THROUGH */ +  /* FALLTHRU */       case T_MULTISET:    /* FIXME: This behavior for multisets isn't clean. It should be    * compat only. */    stack_swap();    f_values(1);    stack_swap();    -  /* FALL_THROUGH */ +  /* FALLTHRU */       case T_STRING: /* Strings are odd. /Noring */    case T_ARRAY:    f_search(2);       if(TYPEOF(Pike_sp[-1]) == T_INT)    Pike_sp[-1].u.integer = (Pike_sp[-1].u.integer != -1);    break;       default:
pike.git/src/builtin_functions.c:5226:    push_int(1);    return;       case T_FUNCTION:    if(program_from_function(Pike_sp-args))    {    pop_n_elems(args);    push_int(1);    return;    } -  /* FALL_THROUGH */ +  /* FALLTHRU */       default:    pop_n_elems(args);    push_int(0);    }   }      /*! @decl int intp(mixed arg)    *!    *! Returns @expr{1@} if @[arg] is an int, @expr{0@} (zero) otherwise.
pike.git/src/builtin_functions.c:6130:    }    return 0;          case '[':    DOES_MATCH_CLASS(m[i],s[j],ml);    break;       case '\\':    if (++i==ml) return 0; -  /* falthrough */ +  /* FALLTHRU */       default:    if(j>=sl || m[i] != s[j] )    return 0;    j++;    }    }    return j==sl;   }   
pike.git/src/builtin_functions.c:6177:    }    return 0;          case '[':    DOES_MATCH_CLASS(m[i],s[j],ml);    break;       case '\\':    if (++i==ml) return 0; -  /* falthrough */ +  /* FALLTHRU */       default:    if(j>=sl || m[i] != s[j] )    return 0;    j++;    }    }    return j==sl;   }   
pike.git/src/builtin_functions.c:6217:    return 1;       return 0;       case '[':    DOES_MATCH_CLASS(index_shared_string(m,i),index_shared_string(s,j),m->len);    break;       case '\\':    if (++i==m->len) return 0; -  /* falthrough */ +  /* FALLTHRU */    default:    if(j>=s->len ||    index_shared_string(m,i)!=index_shared_string(s,j)) return 0;    j++;    }    }    return j==s->len;   }      static int does_match(struct pike_string *s,int j,