pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:5013:    SIMPLE_TOO_FEW_ARGS_ERROR(NAME, 1); \    if (TYPEOF(Pike_sp[-args]) == T_OBJECT && \    (p = Pike_sp[-args].u.object->prog)) \    { \    int fun = FIND_LFUN(p->inherits[SUBTYPEOF(Pike_sp[-args])].prog, \    LFUN__IS_TYPE); \    if (fun != -1) \    { \    int id_level = \    p->inherits[SUBTYPEOF(Pike_sp[-args])].identifier_level; \ -  push_constant_text(TYPE_NAME); \ +  ref_push_string(literal_##TYPE_NAME##_string); \    apply_low(Pike_sp[-args-1].u.object, fun + id_level, 1); \    stack_unlink(args); \    return; \    } \    } \    t = TYPEOF(Pike_sp[-args]) == TYPE; \    pop_n_elems(args); \    push_int(t); \    }   
pike.git/src/builtin_functions.c:5143:   /*! @decl int floatp(mixed arg)    *!    *! Returns @expr{1@} if @[arg] is a float, @expr{0@} (zero) otherwise.    *!    *! @seealso    *! @[intp()], @[programp()], @[arrayp()], @[multisetp()], @[objectp()],    *! @[mappingp()], @[stringp()], @[functionp()]    */       - TYPEP(f_intp, "intp", T_INT, "int") - TYPEP(f_mappingp, "mappingp", T_MAPPING, "mapping") - TYPEP(f_arrayp, "arrayp", T_ARRAY, "array") - TYPEP(f_multisetp, "multisetp", T_MULTISET, "multiset") - TYPEP(f_stringp, "stringp", T_STRING, "string") - TYPEP(f_floatp, "floatp", T_FLOAT, "float") + TYPEP(f_intp, "intp", T_INT, int) + TYPEP(f_mappingp, "mappingp", T_MAPPING, mapping) + TYPEP(f_arrayp, "arrayp", T_ARRAY, array) + TYPEP(f_multisetp, "multisetp", T_MULTISET, multiset) + TYPEP(f_stringp, "stringp", T_STRING, string) + TYPEP(f_floatp, "floatp", T_FLOAT, float)      /*! @decl array sort(array(mixed) index, array(mixed) ... data)    *!    *! Sort arrays destructively.    *!    *! This function sorts the array @[index] destructively. That means    *! that the array itself is changed and returned, no copy is created.    *!    *! If extra arguments are given, they are supposed to be arrays of the    *! same size as @[index]. Each of these arrays will be modified in the
pike.git/src/builtin_functions.c:8774:       mysp=Pike_sp+3-args;       push_svalue(mysp-3);    push_constant_text("cast");    f_arrow(2);    if (!UNSAFE_IS_ZERO(Pike_sp-1))    {    pop_stack();    -  push_constant_text("array"); +  ref_push_string(literal_array_string);    /* FIXME: Object subtype! */    safe_apply(mysp[-3].u.object,"cast",1);    if (TYPEOF(Pike_sp[-1]) == T_ARRAY)    {    free_svalue(mysp-3);    mysp[-3]=*(--Pike_sp);    dmalloc_touch_svalue(Pike_sp);    f_map(args);    return;    }    pop_stack();    -  push_constant_text("mapping"); +  ref_push_string(literal_mapping_string);    /* FIXME: Object subtype! */    safe_apply(mysp[-3].u.object,"cast",1);    if (TYPEOF(Pike_sp[-1]) == T_MAPPING)    {    free_svalue(mysp-3);    mysp[-3]=*(--Pike_sp);    dmalloc_touch_svalue(Pike_sp);    f_map(args);    return;    }    pop_stack();    -  push_constant_text("multiset"); +  ref_push_string(literal_multiset_string);    /* FIXME: Object subtype! */    safe_apply(mysp[-3].u.object,"cast",1);    if (TYPEOF(Pike_sp[-1]) == T_MULTISET)    {    free_svalue(mysp-3);    mysp[-3]=*(--Pike_sp);    dmalloc_touch_svalue(Pike_sp);    f_map(args);    return;    }
pike.git/src/builtin_functions.c:9205:    case T_OBJECT:    mysp=Pike_sp+3-args;       push_svalue(mysp-3);    push_constant_text("cast");    f_arrow(2);    if (!UNSAFE_IS_ZERO(Pike_sp-1))    {    pop_stack();    -  push_constant_text("array"); +  ref_push_string(literal_array_string);    /* FIXME: Object subtype! */    safe_apply(mysp[-3].u.object,"cast",1);    if (TYPEOF(Pike_sp[-1]) == T_ARRAY)    {    free_svalue(mysp-3);    mysp[-3]=*(--Pike_sp);    dmalloc_touch_svalue(Pike_sp);    f_filter(args);    return;    }    pop_stack();    -  push_constant_text("mapping"); +  ref_push_string(literal_mapping_string);    /* FIXME: Object subtype! */    safe_apply(mysp[-3].u.object,"cast",1);    if (TYPEOF(Pike_sp[-1]) == T_MAPPING)    {    free_svalue(mysp-3);    mysp[-3]=*(--Pike_sp);    dmalloc_touch_svalue(Pike_sp);    f_filter(args);    return;    }    pop_stack();    -  push_constant_text("multiset"); +  ref_push_string(literal_multiset_string);    /* FIXME: Object subtype! */    safe_apply(mysp[-3].u.object,"cast",1);    if (TYPEOF(Pike_sp[-1]) == T_MULTISET)    {    free_svalue(mysp-3);    mysp[-3]=*(--Pike_sp);    dmalloc_touch_svalue(Pike_sp);    f_filter(args);    return;    }