@b4n commented on this pull request.
- static gchar char_at(ScintillaObject *sci, gint pos)
+/* + +----------------------------------------------------------------------------- */ +{ + return sci_get_char_at(sci, pos); +}
The [documented return type of `SCI_GETCHARAT`](https://www.scintilla.org/ScintillaDoc.html#SCI_GETCHARAT) is `int`, 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*.