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};
|
||||
|
||||
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);
|
||||
*symbol_maps = calloc(*num, sizeof(SymbolMap));
|
||||
if (*symbol_maps == NULL) { PyErr_NoMemory(); return false; }
|
||||
*maps = calloc(*num, sizeof(SymbolMap));
|
||||
if (*maps == NULL) { PyErr_NoMemory(); return false; }
|
||||
for (size_t s = 0; s < *num; s++) {
|
||||
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;
|
||||
x->left = left; x->right = right; x->font_idx = font_idx;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user