This repository has no description
Something went wrong. Try again.
libghostty: add GHOSTTY_ENUM_MAX_VALUE sentinel to all C enums master
Pre-C23, the C standard allows compilers to choose any integer type that can represent all enum values, so small enums could be backed by char or short. This breaks ABI compatibility with the Zig side, which backs these enums with c_int. Define GHOSTTY_ENUM_MAX_VALUE as INT_MAX in types.h and add it as the last entry in every enum in include/ghostty/vt/. This forces the compiler to use int as the backing type, matching c_int on all targets. INT_MAX is used rather than a fixed constant because enum constants must be representable as int; values above INT_MAX are a constraint violation in standard C. Document this convention in AGENTS.md.
Author Mitchell Hashimoto Date (Apr 8, 2026, 5:34 PM UTC) Commit 9897d6ca 9897d6caba05c0cbf256f86bec2e2935f164a9c7 Parent 853183e9 853183e911b70ff7b61057f52fc7b47ea4934238 Change ID vwonnwnk vwonnwnkunkpsxmtqrpvzvpzyvkwwtpl