IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 22 years ago

Closed 22 years ago

Last modified 22 years ago

#160 closed defect (fixed)

psListSetIterator() doesn't specify which iterator is being set

Reported by: rhl@… Owned by: robert.desonia@…
Priority: high Milestone:
Component: sys Version: unspecified
Severity: normal Keywords:
Cc:

Description

As the summary says, you cannot specify which iterator is being set. There is some confusion
in the code between "where" arguments (e.g. TAIL, HEAD) and "which" arguments (for multiple
iterators)

Incidently,

void listSetIterator(psList* list, int where, bool lockList)

is globally visible without a "ps" prefix (but couldn't it be static?)

rel2_2

Attachments (2)

psList.h (2.9 KB ) - added by Paul Price 22 years ago.
Header file for psList
psMetadata.h (5.0 KB ) - added by Paul Price 22 years ago.
Header file for psMetadata

Download all attachments as: .zip

Change History (6)

comment:1 by Paul Price, 22 years ago

Owner: changed from Paul Price to robert.desonia@…

Added the specification of an iterator in ps{List,Metadata}SetIterator in the
SDRS. Reworked SDRS sections on both psList and psMetadata to remove the
"which" and "where", replacing them with more meaningful "iterator" and
"location" to reduce any confusion.

Also changed the order of some psList function arguments to match that of
psMetadata. I'll attach .h files.

by Paul Price, 22 years ago

Attachment: psList.h added

Header file for psList

by Paul Price, 22 years ago

Attachment: psMetadata.h added

Header file for psMetadata

comment:2 by robert.desonia@…, 22 years ago

Status: newassigned

the protoype in rel2 for listSetIterator (line 33 of psList.c) is:

static void listSetIterator(psList* list, int where, bool lockList);

So, it is not globally visible, as you suggested. To avoid confusion, though, I
added static also to the function implementation (line 254 of psList.c).

I'll look at the changes in the attached header files next week.

comment:3 by robert.desonia@…, 22 years ago

I made the changes to the parameter order of psListAdd and psListRemove, as
given in the header file attached and the new SDRS.

The exact meaning of iterator (as there seems not to be multiple iterators in
the psList struct) prompted bug #192, suggesting a possible API change.

-rdd

comment:4 by robert.desonia@…, 22 years ago

Resolution: fixed
Status: assignedclosed

See bug #192 for the open iterator parameter issue.

Note: See TracTickets for help on using tickets.