You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
652 B

  1. /***********************************************************************/
  2. /* Implements the string (as opposed to unicode) version of the
  3. built-in formatters for string, int, float. That is, the versions
  4. of int.__format__, etc., that take and return string objects */
  5. #include "Python.h"
  6. #include "../Objects/stringlib/stringdefs.h"
  7. #define FORMAT_STRING _PyBytes_FormatAdvanced
  8. #define FORMAT_LONG _PyLong_FormatAdvanced
  9. #define FORMAT_INT _PyInt_FormatAdvanced
  10. #define FORMAT_FLOAT _PyFloat_FormatAdvanced
  11. #ifndef WITHOUT_COMPLEX
  12. #define FORMAT_COMPLEX _PyComplex_FormatAdvanced
  13. #endif
  14. #include "../Objects/stringlib/formatter.h"