blob: 06a2ef590313b4e97c7144a492766aa40049c389 [file] [log] [blame]
Eric Smitha9f7d622008-02-17 19:46:49 +00001/***********************************************************************/
2/* Implements the string (as opposed to unicode) version of the
3 built-in formatters for string, int, float. That is, the versions
Mark Dickinson026ac7c2009-10-15 17:45:39 +00004 of int.__format__, etc., that take and return string objects */
Eric Smitha9f7d622008-02-17 19:46:49 +00005
6#include "Python.h"
Eric Smitha9f7d622008-02-17 19:46:49 +00007#include "../Objects/stringlib/stringdefs.h"
8
Eric Smith9139cc62009-04-30 00:58:58 +00009#define FORMAT_STRING _PyBytes_FormatAdvanced
10#define FORMAT_LONG _PyLong_FormatAdvanced
11#define FORMAT_INT _PyInt_FormatAdvanced
12#define FORMAT_FLOAT _PyFloat_FormatAdvanced
Mark Dickinson026ac7c2009-10-15 17:45:39 +000013#ifndef WITHOUT_COMPLEX
Eric Smith9139cc62009-04-30 00:58:58 +000014#define FORMAT_COMPLEX _PyComplex_FormatAdvanced
Mark Dickinson026ac7c2009-10-15 17:45:39 +000015#endif
Eric Smithdc13b792008-05-30 18:10:04 +000016
Eric Smitha9f7d622008-02-17 19:46:49 +000017#include "../Objects/stringlib/formatter.h"