Skip to content

const-qualify cJSON * in cJSON_PrintPreallocated #822

Open
@escherstair

Description

@escherstair

Like all the other cJSON_Print functions, I think that cJSON *item parameter can be const-qualified in cJSON_PrintPreallocated too
https://github.com/DaveGamble/cJSON/blob/87d8f0961a01bf09bef98ff89bae9fdec42181ee/cJSON.c#L1297C50-L1297C61
should be changed to

CJSON_PUBLIC(cJSON_bool) cJSON_PrintPreallocated(const cJSON *item, char *buffer, const int length, const cJSON_bool format)

I opened PR #823

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions