ST_Within(A, B) => ST_Contains(B, A) so we just delegate this calculation to the Contains implementation.
PG_FUNCTION_INFO_V1(within); Datum within(PG_FUNCTION_ARGS)