diff Python/formatter_string.c @ 47392:47ef9a806ce9 legacy-trunk

Refactor and clean up str.format() code (and helpers) in advance of optimizations.
author Eric Smith <eric@trueblade.com>
date Fri, 30 May 2008 18:10:04 +0000
parents b7231bf6bfb7
children 34e7c1b14495
line wrap: on
line diff
--- a/Python/formatter_string.c	Fri May 30 07:54:16 2008 +0000
+++ b/Python/formatter_string.c	Fri May 30 18:10:04 2008 +0000
@@ -4,12 +4,11 @@
    of int.__float__, etc., that take and return string objects */
 
 #include "Python.h"
-#include "formatter_string.h"
-
 #include "../Objects/stringlib/stringdefs.h"
 
-#define FORMAT_STRING string__format__
-#define FORMAT_LONG   string_long__format__
-#define FORMAT_INT    string_int__format__
-#define FORMAT_FLOAT  string_float__format__
+#define FORMAT_STRING _PyBytes_FormatAdvanced
+#define FORMAT_LONG   _PyLong_FormatAdvanced
+#define FORMAT_INT    _PyInt_FormatAdvanced
+#define FORMAT_FLOAT  _PyFloat_FormatAdvanced
+
 #include "../Objects/stringlib/formatter.h"