Skip to content

Feature request; PWR_ObjGetName #36

@hlward

Description

@hlward

Do I really have to guess about the size of the buffer to pass? Wouldn't it be nice if, say, the size parameter was value-return? Then, instead of returning an error, do what is done now and update the size with the total length.

If the updated length is greater then what I passed in then I know:
a) The buffer has a truncated result
b) What the size of the buffer is that I need.

Because... Right now...

while (PWR_ObjGetName == PWR_RET_TRUNC)
double the buffer size
reallocate a bigger buffer
trim the buffer

...is awkward :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions