#160 closed defect (fixed)
psListSetIterator() doesn't specify which iterator is being set
| Reported by: | Owned by: | ||
|---|---|---|---|
| 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)
Change History (6)
comment:1 by , 22 years ago
| Owner: | changed from to |
|---|
comment:2 by , 22 years ago
| Status: | new → assigned |
|---|
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 , 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 , 22 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
See bug #192 for the open iterator parameter issue.

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.