Mercurial > cpython-lru_cache-weakref
annotate Python/formatter_unicode.c @ 44156:fb84bd9500a4
Remove special-casing of integer operations, to stop
using PyInt_CheckExact.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Tue, 04 Dec 2007 20:34:12 +0000 |
| parents | 5355337709e1 |
| children | 0da27fdf0192 |
| rev | line source |
|---|---|
|
42817
5355337709e1
Implementation of PEP 3101, Advanced String Formatting.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
1 /* implements the unicode (as opposed to string) version of the |
|
5355337709e1
Implementation of PEP 3101, Advanced String Formatting.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
2 built-in formatters for string, int, float. that is, the versions |
|
5355337709e1
Implementation of PEP 3101, Advanced String Formatting.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
3 of int.__float__, etc., that take and return unicode objects */ |
|
5355337709e1
Implementation of PEP 3101, Advanced String Formatting.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
4 |
|
5355337709e1
Implementation of PEP 3101, Advanced String Formatting.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
5 #include "Python.h" |
|
5355337709e1
Implementation of PEP 3101, Advanced String Formatting.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
6 #include "formatter_unicode.h" |
|
5355337709e1
Implementation of PEP 3101, Advanced String Formatting.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
7 |
|
5355337709e1
Implementation of PEP 3101, Advanced String Formatting.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
8 #include "../Objects/stringlib/unicodedefs.h" |
|
5355337709e1
Implementation of PEP 3101, Advanced String Formatting.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
9 |
|
5355337709e1
Implementation of PEP 3101, Advanced String Formatting.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
10 #define FORMAT_STRING unicode_unicode__format__ |
|
5355337709e1
Implementation of PEP 3101, Advanced String Formatting.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
11 #define FORMAT_LONG unicode_long__format__ |
|
5355337709e1
Implementation of PEP 3101, Advanced String Formatting.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
12 #define FORMAT_FLOAT unicode_float__format__ |
|
5355337709e1
Implementation of PEP 3101, Advanced String Formatting.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
13 #include "../Objects/stringlib/formatter.h" |
