summaryrefslogtreecommitdiffstats
path: root/Misc/gdbinit
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-05-29 17:37:05 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2001-05-29 17:37:05 (GMT)
commit1cb7aa3e6e0a7cf94938701ac1a027e1b5b25c1f (patch)
treed7c97c43c109d9e635f90ef88378d490e4b4e873 /Misc/gdbinit
parent9cea41c195ee1067063c011f775f4f61ee463fa1 (diff)
downloadcpython-1cb7aa3e6e0a7cf94938701ac1a027e1b5b25c1f.zip
cpython-1cb7aa3e6e0a7cf94938701ac1a027e1b5b25c1f.tar.gz
cpython-1cb7aa3e6e0a7cf94938701ac1a027e1b5b25c1f.tar.bz2
Internal refactoring of convertsimple() and friends.
Note that lots of code was re-indented. Replace two-step of convertsimple() and convertsimple1() with convertsimple() and helper converterr(), which is called to format error messages when convertsimple() fails. The old code did all the real work in convertsimple1(), but deferred error message formatting to conversimple(). The result was paying the price of a second function call on every call just to format error messages in the failure cases. Factor out of the buffer-handling code in convertsimple() and package it as convertbuffer(). Add two macros to ease readability of Unicode coversions, UNICODE_DEFAULT_ENCODING() and CONV_UNICODE, an error string. The convertsimple() routine had awful indentation problems, primarily because there were two tabs between the case line and the body of the case statements. This patch reformats the entire function to have a single tab between case line and case body, which makes the code easier to read (and consistent with ceval). The introduction of converterr() exacerbated the problem and prompted this fix. Also, eliminate non-standard whitespace after opening paren and before closing paren in a few if statements. (This checkin is part of SF patch 426072.)
Diffstat (limited to 'Misc/gdbinit')
0 files changed, 0 insertions, 0 deletions