Skip to content

Problem: zhash_autofree implies the value must be a string, but the documentation does not mention this #1032

@mitchellwrosen

Description

@mitchellwrosen

A zhash container appears to be able to store arbitrarily typed values (void*) indexed by a string key (char*). However, if autofree is set, there are a couple places in zhash.c that cast the value to a char* and then strdup it. This will surely cause problems if the value was not a char* to begin with.

Solution: Update documentation? Maybe don't strdup the value?

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