What exactly is checked twice? ISTM this just wants to make sure JSON_INT32 is really 4 bytes wide. It's used by the utf-8 codec to represent a unicode character (and that's why a plain int isn't enough; it's 2 bytes on some architectures).