From 1924e4e0c9c863b641f08224f740feb51bf1bc7d Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Thu, 15 Oct 2026 12:28:35 +0300 Subject: Document snapshot pointer lifetimes and make getters NULL-safe The snapshot getters crashed on a NULL snapshot, unlike the rest of the API. They now return NULL, an empty span, 0, or write nothing, as the terminal functions do. term_snapshot_cluster writes nothing when cps is NULL or cap is 0. Document that the view and its palette keep their address for the life of the snapshot, and that a row pointer lasts only until the next update or free, since an update can realloc the cell array. Rename the term_input.h include guard to TERM_INPUT_H to match the file. Co-Authored-By: Claude Haiku 5.5 --- include/term/term_input.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/term/term_input.h') diff --git a/include/term/term_input.h b/include/term/term_input.h index c317bea..19d9355 100644 --- a/include/term/term_input.h +++ b/include/term/term_input.h @@ -1,5 +1,5 @@ -#ifndef TERM_INPUT_TYPES_H -#define TERM_INPUT_TYPES_H +#ifndef TERM_INPUT_H +#define TERM_INPUT_H #include #include @@ -199,4 +199,4 @@ struct term_input_result { } #endif -#endif /* TERM_INPUT_TYPES_H */ +#endif /* TERM_INPUT_H */ -- cgit v1.2.3