Use a union for the data passed around in tty_ctx instead of void *.

This commit is contained in:
nicm
2026-05-22 09:21:32 +00:00
parent d5ee330d20
commit 36bc351557
3 changed files with 49 additions and 37 deletions

17
tmux.h
View File

@@ -1704,9 +1704,20 @@ struct tty_ctx {
#define TTY_CTX_CELL_DRAW_LINE 0x20
#define TTY_CTX_CELL_INVALIDATE 0x40
u_int num;
void *ptr;
void *ptr2;
union {
u_int n;
struct {
const char *data;
size_t size;
} data;
struct {
const char *clip;
const char *data;
size_t size;
} sel;
};
/*
* Cursor and region position before the screen was updated - this is