You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I agree with you this API is poorly implemented - the parameter is a "pass by reference" OUTPUT parameter, changing API with a long history seems Risky.
While I agree with you this API is poorly implemented - the parameter is a "pass by reference" OUTPUT parameter, changing API with a long history seems Risky.
In the current implementation agindex is immediately reassigned so it doesn't even function as an output parameter here. Also, it seems inconsistent to have such a parameter in get_next_char as FT_Get_First_Char takes a similar parameter but its wrapper get_first_char abstracts it and returns the value directly.
It seems to be returned as "(return, agindex)", I think? I don't disagree with the idea of the pull, but an API change of a frequently used API needs a bit more thought.
Both FT_Get_First_Char and FT_Get_Next_Char return a character code directly and a glyph index via a pointer parameter agindex. The wrappers get_first_char and get_next_char indeed return a tuple of the two values, so the parameter agindex would not be needed in either function, but it is nevertheless present in get_next_char, while it is absent in get_first_char. Aside from that inconsistency, the first line of get_next_char assigns a new FT_UInt to agindex, so whatever was passed in that parameter is lost and the subsequent call to FT_Get_Next_Char modifies a new object, leaving the original argument unchanged.
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
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 parameter
agindexinget_next_charis not used