pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:4102:       default:    SIMPLE_ARG_TYPE_ERROR("types", 1,    "string|array|mapping|"    "multiset|object|program|function");    }    pop_n_elems(args);    push_array(a);   }    - /*! @decl array(array(Pike.Annotation)) annotations(object|program|function x, @ -  *! int(0..1)|void recurse) + /*! @decl array(multiset(Pike.Annotation)) annotations(object|program|function x, @ +  *! int(0..1)|void recurse)    *!    *! Return an array with the annotations for all symbols in @[x].    *!    *! @param x    *! @mixed    *! @type object    *! For objects which define @[lfun::_annotations()] that return value    *! is used.    *!    *! For other objects an array with annotations for all non-protected    *! symbols is returned.    *! @type program -  *! Returns an array with annotations for all non-protected symbols. +  *! Returns an array with annotations for all non-protected +  *! constant symbols.    *! @endmixed    *!    *! @param recurse    *! Include annotations recursively added via inherits.    *! -  +  *! @returns +  *! The order of the resulting array is the same as that of @[indices()] +  *! for the same @[x]. +  *!    *! @note    *! This function was added in Pike 8.1.    *!    *! @seealso    *! @[indices()], @[values()], @[types()]    */   PMOD_EXPORT void f_annotations(INT32 args)   {    ptrdiff_t size;    struct array *a = NULL;
pike.git/src/builtin_functions.c:10137:       /* function(string|multiset:array(int))|function(array(0=mixed)|mapping(mixed:0=mixed)|object|program:array(0)) */    ADD_EFUN2("types", f_types,    tOr3(tFunc(tOr3(tNStr(tSetvar(0,tInt)),    tArr(tSetvar(0,tMix)),    tMap(tMix,tSetvar(0,tMix))),    tArr(tType(tVar(0)))),    tFunc(tMultiset, tArr(tType(tInt1))),    tFunc(tOr(tObj,tPrg(tObj)), tArr(tType(tMix)))),0,NULL,0);    -  /* function(object|program, int|void:array(array)) */ +  /* function(object|program, int(0..1)|void:array(multiset)) */    ADD_EFUN2("annotations", f_annotations, -  tFunc(tOr(tObj,tPrg(tObj) tOr(tInt01,tVoid)), tArr(tArr(tMix))),0,NULL,0); +  tFunc(tOr(tObj,tPrg(tObj) tOr(tInt01,tVoid)), tArr(tSet(tMix))),0,NULL,0);       /* function(mixed:int) */    ADD_EFUN2("zero_type",f_zero_type,tFunc(tMix,tInt01),0,0,generate_zero_type);       /* function(string,string:array) */    ADD_EFUN("array_sscanf", f_sscanf,    tFunc(tStr tAttr("sscanf_format", tStr),    tArr(tAttr("sscanf_args", tMix))), OPT_TRY_OPTIMIZE);       ADD_EFUN("__handle_sscanf_format", f___handle_sscanf_format,