Fix compilation with gcc 8

Apparently some nitwit Linux distros have made an unreleased compiler
their default compiler. Fixes #376

Fixes various new warnings that GCC 8 issues
This commit is contained in:
Kovid Goyal
2018-03-12 10:38:12 +05:30
parent 0333da991d
commit 527255e3a1
18 changed files with 66 additions and 52 deletions

View File

@@ -532,7 +532,8 @@ render_glyphs_in_cells(PyObject *f, bool bold, bool italic, hb_glyph_info_t *inf
}
static PyObject*
display_name(Face *self) {
display_name(PyObject *s, PyObject *a UNUSED) {
Face *self = (Face*)s;
const char *psname = FT_Get_Postscript_Name(self->face);
if (psname) return Py_BuildValue("s", psname);
Py_INCREF(self->path);
@@ -540,8 +541,8 @@ display_name(Face *self) {
}
static PyObject*
extra_data(Face *self) {
return PyLong_FromVoidPtr(self->extra_data);
extra_data(PyObject *self, PyObject *a UNUSED) {
return PyLong_FromVoidPtr(((Face*)self)->extra_data);
}
// Boilerplate {{{