Eric Smith | a9f7d62 | 2008-02-17 19:46:49 +0000 | [diff] [blame] | 1 | /***********************************************************************/ |
| 2 | /* Implements the string (as opposed to unicode) version of the |
| 3 | built-in formatters for string, int, float. That is, the versions |
Mark Dickinson | 026ac7c | 2009-10-15 17:45:39 +0000 | [diff] [blame] | 4 | of int.__format__, etc., that take and return string objects */ |
Eric Smith | a9f7d62 | 2008-02-17 19:46:49 +0000 | [diff] [blame] | 5 | |
| 6 | #include "Python.h" |
Eric Smith | a9f7d62 | 2008-02-17 19:46:49 +0000 | [diff] [blame] | 7 | #include "../Objects/stringlib/stringdefs.h" |
| 8 | |
Eric Smith | 9139cc6 | 2009-04-30 00:58:58 +0000 | [diff] [blame] | 9 | #define FORMAT_STRING _PyBytes_FormatAdvanced |
| 10 | #define FORMAT_LONG _PyLong_FormatAdvanced |
| 11 | #define FORMAT_INT _PyInt_FormatAdvanced |
| 12 | #define FORMAT_FLOAT _PyFloat_FormatAdvanced |
Mark Dickinson | 026ac7c | 2009-10-15 17:45:39 +0000 | [diff] [blame] | 13 | #ifndef WITHOUT_COMPLEX |
Eric Smith | 9139cc6 | 2009-04-30 00:58:58 +0000 | [diff] [blame] | 14 | #define FORMAT_COMPLEX _PyComplex_FormatAdvanced |
Mark Dickinson | 026ac7c | 2009-10-15 17:45:39 +0000 | [diff] [blame] | 15 | #endif |
Eric Smith | dc13b79 | 2008-05-30 18:10:04 +0000 | [diff] [blame] | 16 | |
Eric Smith | a9f7d62 | 2008-02-17 19:46:49 +0000 | [diff] [blame] | 17 | #include "../Objects/stringlib/formatter.h" |