# sort_get_panes

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/sort.c#L488
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-sort_get_panes/

```c
struct window_pane ** sort_get_panes(u_int *n, struct sort_criteria *sort_crit)
```

## Parameters

- `n` (`u_int *`)
- `sort_crit` (`struct sort_criteria *`)

## Calls

- [`sort_qsort`](/en/tmux/3.7c/reference/c-function-sort-c-sort_qsort/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/sort.c#L512)
- [`xreallocarray`](/en/tmux/3.7c/reference/c-function-xreallocarray/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/sort.c#L505)

## Other function references

- [`sort_pane_cmp`](/en/tmux/3.7c/reference/c-function-sort-c-sort_pane_cmp/) (function)

## Referenced declarations

- [`window_pane.entry`](/en/tmux/3.7c/reference/c-struct-window_pane-entry/) (attribute)
- [`window.panes`](/en/tmux/3.7c/reference/c-struct-window-panes/) (attribute)
- [`sort_criteria`](/en/tmux/3.7c/reference/c-struct-sort_criteria/) (struct)
- [`winlink.window`](/en/tmux/3.7c/reference/c-struct-winlink-window/) (attribute)
- [`window_pane`](/en/tmux/3.7c/reference/c-struct-window_pane/) (struct)
- [`session.windows`](/en/tmux/3.7c/reference/c-struct-session-windows/) (attribute)
