diff options
author | Andrew MacIntyre <andymac@bullseye.apana.org.au> | 2002-02-26 11:36:35 (GMT) |
---|---|---|
committer | Andrew MacIntyre <andymac@bullseye.apana.org.au> | 2002-02-26 11:36:35 (GMT) |
commit | c487439aa79acaf6c83a65985c110d5ca1ea71da (patch) | |
tree | 82e92be005591f583ab902c6f6755ba046d41f56 /Objects/stringobject.c | |
parent | 5e090fc98525308d2a86eaf5c535c3c2ba1a644c (diff) | |
download | cpython-c487439aa79acaf6c83a65985c110d5ca1ea71da.zip cpython-c487439aa79acaf6c83a65985c110d5ca1ea71da.tar.gz cpython-c487439aa79acaf6c83a65985c110d5ca1ea71da.tar.bz2 |
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).
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r-- | Objects/stringobject.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index ae08910..2824857 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -3100,6 +3100,15 @@ formatint(char *buf, size_t buflen, int flags, 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); } |