[Python-Dev] Re: python/dist/src/Objectsunicodeobject.c, 2.204, 2.205

Tim Peters tim.one at comcast.net
Sat Dec 20 21:52:03 EST 2003

[Skip Montanaro]
> Isn't that supposed to always be defined in limits.h or is UCHAR_MAX
> not a standard macro?

Yes, it's supposed to be there.  OTOH, so is limits.h, i.e. the
HAVE_LIMITS_H test shouldn't be necessary either.  So they're just sanity
checks.  But you're right, if UCHAR_MAX isn' defined, I was thinking the
preprocessor would expand

#if UCHAR_MAX != 255


#if != 255

and then the error message would be incomprehensible.  But unknown names in
preprocessor conditionals actually get replaced by 0, and

#if 0 != 255

does just as well.

> Sounds like a plan.  I modify my local source and see if it affects
> anything.

It should work fine.

More information about the Python-Dev mailing list