glfwGetError should accept a pointer to a cstring instead of a cstringarray#5
Open
zacharycarter wants to merge 1 commit into
Open
glfwGetError should accept a pointer to a cstring instead of a cstringarray#5zacharycarter wants to merge 1 commit into
zacharycarter wants to merge 1 commit into
Conversation
Author
|
Oh - I realized that this file was generated just now haha... Well, I guess the PR needs to be a bit more elaborate than this. Let me try to track down where to make the change. If I can figure it out in five minutes or so I'll do it, otherwise I'll leave it to you, unless you really want help with it :) Edit: Okay yeah, I'm not going to touch it anymore - I'm just going to fix it in my code for now. I see there's multiple places of cstringarray and probably some where it actually needs to be present, however it's only referenced once in the generator, so I will leave it up to you to decide how to fix this, if you want to even :) Feel free to close this! I just wanted to leave it here until you saw it. |
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.
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.