@rdipardo commented on this pull request.
In bracketcolors/src/bracketcolors.cc:
> + static gchar char_at(ScintillaObject *sci, gint pos) +/* + +----------------------------------------------------------------------------- */ +{ + return sci_get_char_at(sci, pos); +}
Just curious: why the wrapper?
The documented return type of SCI_GETCHARAT
is int
, presumably for Unicode characters up to 32 bits in length. Squeezing that into an 8-bit(?) (g)char
needs an explicit cast.
The (implied) point that just using the returned (g)int
without a cast is worth considering. At the same time, the pos
argument might be safer as the (platform independent) Sci_Position
type. The API structures that can only index 32-bit positions are slated for eventual deprecation.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.