From 5a044c0320bfc0a15b9d33926b90ba134ff474f6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 1 Nov 2017 10:44:03 +0530 Subject: [PATCH] ... --- kitty/fonts.c | 2 +- kitty_tests/fonts.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kitty/fonts.c b/kitty/fonts.c index c09462f75..d5c1a0245 100644 --- a/kitty/fonts.c +++ b/kitty/fonts.c @@ -195,7 +195,7 @@ static inline void clear_canvas(void) { memset(canvas, 0, cell_width * cell_heig static void python_send_to_gpu(unsigned int x, unsigned int y, unsigned int z, uint8_t* buf) { if (python_send_to_gpu_impl) { - PyObject *ret = PyObject_CallFunction(python_send_to_gpu_impl, "IIIy#", x, y, z, buf, cell_width * cell_height); + PyObject *ret = PyObject_CallFunction(python_send_to_gpu_impl, "IIIy#", x, y, z, buf, (int)(cell_width * cell_height)); if (ret == NULL) PyErr_Print(); else Py_DECREF(ret); } diff --git a/kitty_tests/fonts.py b/kitty_tests/fonts.py index 892f1753e..b47b6cff0 100644 --- a/kitty_tests/fonts.py +++ b/kitty_tests/fonts.py @@ -20,7 +20,6 @@ class Rendering(BaseTest): cls.sprites[(x, y, z)] = data set_send_sprite_to_gpu(send_to_gpu) - cls.cell_width, cls.cell_height = set_font_family(override_dpi=(96.0, 96.0)) @classmethod def tearDownClass(cls): @@ -29,6 +28,7 @@ class Rendering(BaseTest): def setUp(self): self.sprites.clear() + self.cell_width, self.cell_height = set_font_family(override_dpi=(96.0, 96.0)) def tearDown(self): self.sprites.clear()