mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-09-22 03:57:30 +03:00
...
This commit is contained in:
parent
43f435c334
commit
a9a7912372
@ -1338,13 +1338,13 @@ typedef struct {
|
|||||||
DescriptorIndices descriptor_indices = {0};
|
DescriptorIndices descriptor_indices = {0};
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
set_symbol_maps(SymbolMap **symbol_maps, size_t *num, const PyObject *sm) {
|
set_symbol_maps(SymbolMap **maps, size_t *num, const PyObject *sm) {
|
||||||
*num = PyTuple_GET_SIZE(sm);
|
*num = PyTuple_GET_SIZE(sm);
|
||||||
*symbol_maps = calloc(*num, sizeof(SymbolMap));
|
*maps = calloc(*num, sizeof(SymbolMap));
|
||||||
if (*symbol_maps == NULL) { PyErr_NoMemory(); return false; }
|
if (*maps == NULL) { PyErr_NoMemory(); return false; }
|
||||||
for (size_t s = 0; s < *num; s++) {
|
for (size_t s = 0; s < *num; s++) {
|
||||||
unsigned int left, right, font_idx;
|
unsigned int left, right, font_idx;
|
||||||
SymbolMap *x = *symbol_maps + s;
|
SymbolMap *x = *maps + s;
|
||||||
if (!PyArg_ParseTuple(PyTuple_GET_ITEM(sm, s), "III", &left, &right, &font_idx)) return NULL;
|
if (!PyArg_ParseTuple(PyTuple_GET_ITEM(sm, s), "III", &left, &right, &font_idx)) return NULL;
|
||||||
x->left = left; x->right = right; x->font_idx = font_idx;
|
x->left = left; x->right = right; x->font_idx = font_idx;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user