Branch: Tag:

2021-01-27

2021-01-27 20:50:05 by H William Welliver <william@welliver.org>

Program.annotations: invert recursion flag to make more sense for the default case.

4313:         /*! @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
4322:    *! @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.
4364:    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);