diff --git a/kitty/shaders/compiler.cpp b/kitty/shaders/compiler.cpp index 21b499099..b52b838e5 100644 --- a/kitty/shaders/compiler.cpp +++ b/kitty/shaders/compiler.cpp @@ -125,9 +125,9 @@ new_gs(PyTypeObject *type, PyObject *args, PyObject *kwds) { GlobalSession *self; static const char* kw[] = {"enable_glsl_input", NULL}; int enable_glsl_input = 0; - if (args && !PyArg_ParseTupleAndKeywords(args, kwds, "|p", kw, &enable_glsl_input)) return NULL; - self = (GlobalSession *)type->tp_alloc(type, 0); - ScopedPyObject ans((PyObject*)self); + if (args && !PyArg_ParseTupleAndKeywords(args, kwds, "|p", const_cast(kw), &enable_glsl_input)) return NULL; + self = reinterpret_cast(type->tp_alloc(type, 0)); + ScopedPyObject ans(reinterpret_cast(self)); if (self != NULL) { self->ptr = nullptr; SlangGlobalSessionDesc desc = {.enableGLSL=static_cast(enable_glsl_input)};