castable_to_type(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME: castable_to_type(9) πŸ’–

okay so bestie, welcome to the manual page for castable_to_type(9) β€” yes, that's the manual name, and it's from the Kernel API Manual. This thing is like __same_type(), but it also allows for casted literals. slay. πŸ’…βœ¨

πŸ¦‹ SYNOPSIS πŸ¦‹

castable_to_type (n , T );

🌸 ARGUMENTS 🌸

  • n β€” a variable or constant value. literally either vibe is allowed in this slot. πŸ“
  • T β€” a variable or data type. it's the second argument, bestie. πŸŽ€

πŸ’… DESCRIPTION πŸ’…

here's the actual tea, no cap: unlike the __same_type macro, this allows a constant value as the first argument. If this value would not overflow into an assignment of the second argument's type, it returns true. Otherwise, this falls back to __same_type. that's the whole bit β€” iconic, concise, done. 🫢πŸ”₯

🌈 SEE ALSO 🌈

Kernel file ./include/linux/overflow.h, plus the whole overflow bestie lineup:


and that's the page, bestie! πŸ’Œ source/version: ./include/linux; date: October 2026. mwah πŸ’‹

πŸ“¦ where this page comes from