Use pointer to const for strings that aren't/shouldn't be modified#6
Closed
criptych wants to merge 73 commits into
Closed
Use pointer to const for strings that aren't/shouldn't be modified#6criptych wants to merge 73 commits into
criptych wants to merge 73 commits into
Conversation
Add basic reader fields to the parser structure. Start implementing basic parser functions.
Reader is mostly done (though untested).
Add YAML_DECLARE to the API declarations (Thanks to Peter Murphy for suggestion).
Add a basic description of all tokens produced by the scanner.
… should (Thanks Anders Kaseorg).
…ith the previous one.
…ple key (yaml#150, thank to spitzak(at)rhythm(dot)com).
…potential simple key (yaml#156, thank to ppelletier(at)oblong(dot)com).
https://bitbucket.org/xi/libyaml/issue/10/wrapped-strings-cause-assert-failure Commenting out the assert makes the scanner do the right thing and results in just a simple parse failure.
sigmavirus24
pushed a commit
to sigmavirus24/libyaml
that referenced
this pull request
Apr 6, 2017
Contributor
|
Generally speaking, I think const correctness makes sense. That said, this Pr should be rebased before we can move forward with the integration. |
Member
|
I rebased this PR and created #140 |
Member
|
thanks, merged #140! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A handful of functions that take
char*(actuallyyaml_char_t*) arguments don't actually modify the string passed (they make an internal copy).This patch adds a const qualifier to these arguments so the functions can be used safely with e.g. string constants or
const*return values without unnecessary warnings and/or casts.