#114 closed defect (fixed)
Questions/Comments for psMetadataItemAlloc() Function (Section 5.2.2 SDRS)
| Reported by: | Owned by: | eugene | |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | IPP SDRS | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: |
Description
I would like to change the argument list to the psMetadataItemAlloc() function
as follows:
1) Rename the first argument to fmt, since it represents the formatting for the
metadata item name. We use the fmt argument in a similar fashion for psAbort
and psError.
2) Replace the second argument, format, with two arguments - type and flags. I
didn't think users should have to know to perform a binary OR if it's easier to
add an extra argument. Also, passing the non ORed type and flags seemed more
consistent with other allocators like psVector, psScalar, and psImage that also
pass in type.
3) For the variable argument list section of the argument list, I'd like to
have the metadata item data value come before the formatting arguments. It's
more difficult to pull the metadata item value off the very the end of the
variable argument list than it is at the beginning.
Here's what the new prototype would look like:
psMetadataItem *psMetadataItemAlloc(const char *fmt, psMetadataType type,
psMetadataFlags, flags, const char* comment, ...);
Change History (2)
comment:1 by , 22 years ago
| Status: | new → assigned |
|---|
comment:2 by , 22 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
changed SDRS to reflect this (not in v.05)

we discussed this on the phone, but for the record:
1) let's keep it as 'name' since it matches the psMetadataItem.name element
2) let's just drop the flags concept and rename #2 to type
3) yes, the pointer to the metadata item value should be first.