Mercurial > cpython-lru_cache-weakref
diff Objects/stringobject.c @ 22053:49197fd76362 legacy-trunk
OS/2 EMX port changes (Objects part of patch #450267):
Objects/
fileobject.c
stringobject.c
unicodeobject.c
This commit doesn't include the cleanup patches for stringobject.c and
unicodeobject.c which are shown separately in the patch manager. Those
patches will be regenerated and applied in a subsequent commit, so as
to preserve a fallback position (this commit to those files).
| author | Andrew MacIntyre <andymac@bullseye.apana.org.au> |
|---|---|
| date | Tue, 26 Feb 2002 11:36:35 +0000 |
| parents | 30a817038af0 |
| children | 5b24a6ae2dc4 |
line wrap: on
line diff
--- a/Objects/stringobject.c Tue Feb 26 11:20:01 2002 +0000 +++ b/Objects/stringobject.c Tue Feb 26 11:36:35 2002 +0000 @@ -3100,6 +3100,15 @@ buf[0] = '0'; buf[1] = (char)type; } +#if defined(PYOS_OS2) && defined(PYCC_GCC) + /* unfortunately, the EMX C runtime gives us '0x' as the base + * marker for %X when we expect/want '0X' + */ + else if ((flags & F_ALT) && (type == 'X')) { + assert(buf[1] == 'x'); + buf[1] = (char)type; + } +#endif return strlen(buf); }
