# utf8_insert_width_cache

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L297
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-utf8-c-utf8_insert_width_cache/

```c
static void utf8_insert_width_cache(wchar_t wc, u_int width)
```

## Parameters

- `wc` (`wchar_t`)
- `width` (`u_int`)

## Called by

- [`utf8_add_to_width_cache`](/en/tmux/latest/reference/c-function-utf8-c-utf8_add_to_width_cache/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L378)

## Calls

- [`log_debug`](/en/tmux/latest/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L301)
- [`xcalloc`](/en/tmux/latest/reference/c-function-xcalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L303)

## Referenced declarations

- [`utf8_width_item.allocated`](/en/tmux/latest/reference/c-struct-utf8_width_item-allocated/) (attribute)
- [`utf8_width_item.wc`](/en/tmux/latest/reference/c-struct-utf8_width_item-wc/) (attribute)
- [`utf8_width_item.width`](/en/tmux/latest/reference/c-struct-utf8_width_item-width/) (attribute)
