pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:4306:       default:    SIMPLE_ARG_TYPE_ERROR("annotations", 1, "object|program|function");    }    pop_n_elems(args);    push_array(a);   }         /*! @decl multiset(Pike.Annotation) annotations(program x, @ -  *! int(0..1)|void recurse) +  *! int(0..1)|void no_recurse)    *! @appears Program.annotations    *!    *! Return a multiset with the annotations for all symbols in @[x] attached    *! to this program.    *!    *! @param x    *! Program whose identifiers should be returned.    *! -  *! @param recurse -  *! Include annotations recursively added via inherits. +  *! @param no_recurse +  *! Do not include annotations recursively added via inherits.    *!    *! @returns    *! Returns an multiset with annotations added directly to this program.    *!    *!    *! @note    *! This function was added in Pike 8.1.    *!    *! @seealso    *! @[indices()], @[values()], @[types()], @[lfun::_annotations()],
pike.git/src/builtin_functions.c:4357:       default:    SIMPLE_ARG_TYPE_ERROR("direct_program_annotations", 1, "program");    }       pop_n_elems(args);       if(m != NULL && m->size > 0)    {    struct multiset * set; -  if((flag & 1) &&TYPEOF(ITEM(m)[(m->size -1)]) == PIKE_T_MULTISET) { +  if(!(flag & 1) && TYPEOF(ITEM(m)[(m->size -1)]) == PIKE_T_MULTISET) {    found = 1;    set = ITEM(m)[(m->size -1)].u.multiset;    ref_push_multiset(set);    } -  else if(!(flag & 1) && TYPEOF(ITEM(m)[0]) == PIKE_T_MULTISET) { +  else if((flag & 1) && TYPEOF(ITEM(m)[0]) == PIKE_T_MULTISET) {    found = 1;    set = ITEM(m)[0].u.multiset;    ref_push_multiset(set);    }       }    if(!found){    push_int(0);    }   }