diff options
author | Ned Deily <nad@acm.org> | 2014-05-22 15:29:18 -0700 |
---|---|---|
committer | Ned Deily <nad@acm.org> | 2014-05-22 15:29:18 -0700 |
commit | fcc387425dca970e54cddabb539b54849e7137fc (patch) | |
tree | db8e1f7aef6b4cd5a17892c5f1aa7d916e9e61b0 /Python/formatter_unicode.c | |
parent | 02256dcd881900c4b22140aaf8f3a17a17319bd0 (diff) | |
parent | 6248652cd68fb12e060c9ec640e74c15be10af8f (diff) | |
download | cpython-fcc387425dca970e54cddabb539b54849e7137fc.tar.gz |
Issue #21383: OS X installer builds now use "make touch".
Diffstat (limited to 'Python/formatter_unicode.c')
-rw-r--r-- | Python/formatter_unicode.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Python/formatter_unicode.c b/Python/formatter_unicode.c index e3a8149841..056bb76902 100644 --- a/Python/formatter_unicode.c +++ b/Python/formatter_unicode.c @@ -846,6 +846,13 @@ format_long_internal(PyObject *value, const InternalFormatSpec *format, " format specifier 'c'"); goto done; } + /* error to request alternate format */ + if (format->alternate) { + PyErr_SetString(PyExc_ValueError, + "Alternate form (#) not allowed with integer" + " format specifier 'c'"); + goto done; + } /* taken from unicodeobject.c formatchar() */ /* Integer input truncated to a character */ |