Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

const-qualify cJSON * in cJSON_PrintPreallocated #822

Open
escherstair opened this issue Jan 18, 2024 · 0 comments
Open

const-qualify cJSON * in cJSON_PrintPreallocated #822

escherstair opened this issue Jan 18, 2024 · 0 comments

Comments

@escherstair
Copy link

escherstair commented Jan 18, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant