@b4n 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); +}
The documented return type of
SCI_GETCHARAT
isint
, presumably for Unicode characters up to 32 bits in length.
No, that's probably either because int
is "the" basic numerical type in C, or because of other historical reasons (and technically it is returned as a sptr_t
). In practice, the returned value comes from Document::ChatAt()
which returns a char
. So if if want to be picky, it's actually a char
stored into a sptr_t
.
Squeezing that into an 8-bit(?)
(g)char
needs an explicit cast.
Well, yes, but… actually no: this does not actually wrap SCI_GETCHARAT
, but Geany's own wrapper, sci_get_char_at()
which has the exact same signature.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.