-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Add length parameters to all the functions that take or return strings #57
Comments
That would also allow cJSON to improve conformance with the JSON standard in the future by allowing |
I am currently refactoring the parser so it doesn't rely on |
@FSMaxB Is this feature implemented in the newest version of cJSON? Or does it still rely on null terminating strings? It would be extremly helpful for us if there was a parse function that takes a length as argument. |
@maluJ It will still take some time until this makes it into a release, but internally it is already implemented. My current plan ist to expose it with #186, then make a release candidate and wait for feedback, but I can't provide any estimate on when this will be the case. If you want this now and don't mind maintaining a local fork, you can make your own version of Lines 1000 to 1078 in 0e0c463
|
I'm in the same boat as @maluJ, it's too bad that currently |
@simias Sadly I've been really busy lately, so I didn't find the time to do much more than fix bugs and respond to issues. |
I was looking around, and thought, surely this must be done now. Really all that is needed is just an alternative version of ParseWIthOpts that passes a length. I can build a local version that does this and send a PR, if that's more likely to get the change integrated? |
I will submit one later this morning.
…On Tue, Sep 11, 2018, 1:12 AM MopeZe ***@***.***> wrote:
@FSMaxB <https://github.com/FSMaxB> @gdamore <https://github.com/gdamore>
It would still be a great improvement if a function with len argument would
be available. So yes, would be great if you can file a PR.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#57 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABPDfROULvzBs62kxk7douM8HTRibqOGks5uZ3BRgaJpZM4KwVba>
.
|
Please see PR #299 |
I think all functions that take a string or return one should also take/return a length.
This would be part of the breaking changes in 2.0.0.
The text was updated successfully, but these errors were encountered: