From: Collin Funk Date: Mon, 28 Jul 2025 20:00:21 GMT Subject: Re: [PATCH 4/7] xdiff: make fields of xrecord_t Rust friendly Message-ID: <87ecu0nl0q.fsf@gmail.com> In-Reply-To: Ezekiel Newren writes: > Rust defines char as 32 bits. C treats char as signed 8 bits. What git > really means by char* is treat everything like a byte string, and u8 > is how raw bytes are handled in Rust. Minor correction, but the C standard leaves the signedness of 'char' up to the implementation. Portable code must be written to assume a plain 'char' can be signed or unsigned. Using the test program below: #include #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) int main (void) { printf ("%d\n", TYPE_SIGNED (char)); return 0; } On GNU/Linux x86_64: $ ./a.out 1 On GNU/Linux aarch64: $ ./a.out 0 Collin