annotate Python/formatter_unicode.c @ 58765:2ba7677bfa95 legacy-trunk

testCopysign was defined twice in test_math; combine the definitions
author Mark Dickinson <dickinsm@gmail.com>
date Sat, 06 Feb 2010 23:11:25 +0000
parents 34e7c1b14495
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
45381
b7231bf6bfb7 Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
1 /* Implements the unicode (as opposed to string) version of the
b7231bf6bfb7 Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
2 built-in formatter for unicode. That is, unicode.__format__(). */
b7231bf6bfb7 Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
3
b7231bf6bfb7 Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
4 #include "Python.h"
51032
551257c8058a fix building the core with --disable-unicode
Benjamin Peterson <benjamin@python.org>
parents: 47392
diff changeset
5
551257c8058a fix building the core with --disable-unicode
Benjamin Peterson <benjamin@python.org>
parents: 47392
diff changeset
6 #ifdef Py_USING_UNICODE
551257c8058a fix building the core with --disable-unicode
Benjamin Peterson <benjamin@python.org>
parents: 47392
diff changeset
7
45381
b7231bf6bfb7 Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
8 #include "../Objects/stringlib/unicodedefs.h"
b7231bf6bfb7 Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
9
47392
47ef9a806ce9 Refactor and clean up str.format() code (and helpers) in advance of optimizations.
Eric Smith <eric@trueblade.com>
parents: 45381
diff changeset
10 #define FORMAT_STRING _PyUnicode_FormatAdvanced
47ef9a806ce9 Refactor and clean up str.format() code (and helpers) in advance of optimizations.
Eric Smith <eric@trueblade.com>
parents: 45381
diff changeset
11
53629
34e7c1b14495 Issue #1588: Add complex.__format__.
Eric Smith <eric@trueblade.com>
parents: 51032
diff changeset
12 /* don't define FORMAT_LONG, FORMAT_FLOAT, and FORMAT_COMPLEX, since
34e7c1b14495 Issue #1588: Add complex.__format__.
Eric Smith <eric@trueblade.com>
parents: 51032
diff changeset
13 we can live with only the string versions of those. The builtin
34e7c1b14495 Issue #1588: Add complex.__format__.
Eric Smith <eric@trueblade.com>
parents: 51032
diff changeset
14 format() will convert them to unicode. */
47392
47ef9a806ce9 Refactor and clean up str.format() code (and helpers) in advance of optimizations.
Eric Smith <eric@trueblade.com>
parents: 45381
diff changeset
15
45381
b7231bf6bfb7 Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
16 #include "../Objects/stringlib/formatter.h"
51032
551257c8058a fix building the core with --disable-unicode
Benjamin Peterson <benjamin@python.org>
parents: 47392
diff changeset
17
551257c8058a fix building the core with --disable-unicode
Benjamin Peterson <benjamin@python.org>
parents: 47392
diff changeset
18 #endif