glfwGetError should accept a pointer to a cstring instead of a cstringarray #5
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.
The docs for GLFW indicate that this function should accept as a parameter:
[in] description Where to store the error description pointer, or NULL.
It also states that:
The returned string is allocated and freed by GLFW. You should not free it yourself. It is guaranteed to be valid only until the next error occurs or the library is terminated.
I think there's a bit of a inaccuracy in that last part of the documentation, because a string isn't returned it's just allocated by GLFW and the pointer is made to point at it.
If we take a look at some of the example GLFW code itself, we can see that it is indeed the case that a cstring's address is intended to be passed to the function:
So this PR just addresses this. I'm not sure how much it potentially breaks for users.