Skip to content

Commit d2ebf66

Browse files
committed
Rename to PyUnicodeWriter_Format() again
1 parent 0cc3fbe commit d2ebf66

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Include/cpython/unicodeobject.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,7 @@ typedef struct PyUnicodeWriter PyUnicodeWriter;
451451
PyAPI_FUNC(PyUnicodeWriter*) PyUnicodeWriter_Create(void);
452452
PyAPI_FUNC(void) PyUnicodeWriter_Free(PyUnicodeWriter *writer);
453453
PyAPI_FUNC(PyObject*) PyUnicodeWriter_Finish(PyUnicodeWriter *writer);
454+
454455
PyAPI_FUNC(void) PyUnicodeWriter_SetOverallocate(
455456
PyUnicodeWriter *writer,
456457
int overallocate);
@@ -462,6 +463,7 @@ PyAPI_FUNC(int) PyUnicodeWriter_WriteString(
462463
PyUnicodeWriter *writer,
463464
const char *str,
464465
Py_ssize_t size);
466+
465467
PyAPI_FUNC(int) PyUnicodeWriter_WriteStr(
466468
PyUnicodeWriter *writer,
467469
PyObject *str);
@@ -470,7 +472,7 @@ PyAPI_FUNC(int) PyUnicodeWriter_WriteSubstring(
470472
PyObject *str,
471473
Py_ssize_t start,
472474
Py_ssize_t stop);
473-
PyAPI_FUNC(int) PyUnicodeWriter_FromFormat(
475+
PyAPI_FUNC(int) PyUnicodeWriter_Format(
474476
PyUnicodeWriter *writer,
475477
const char *format,
476478
...);

Modules/_testcapi/unicode.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,8 @@ test_unicodewriter_format(PyObject *self, PyObject *Py_UNUSED(args))
346346
return NULL;
347347
}
348348

349-
// test PyUnicodeWriter_FromFormat()
350-
if (PyUnicodeWriter_FromFormat(writer, "%s %i", "Hello", 123) < 0) {
349+
// test PyUnicodeWriter_Format()
350+
if (PyUnicodeWriter_Format(writer, "%s %i", "Hello", 123) < 0) {
351351
goto error;
352352
}
353353

Objects/unicodeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2949,7 +2949,7 @@ PyUnicode_FromFormat(const char *format, ...)
29492949
}
29502950

29512951
int
2952-
PyUnicodeWriter_FromFormat(PyUnicodeWriter *writer, const char *format, ...)
2952+
PyUnicodeWriter_Format(PyUnicodeWriter *writer, const char *format, ...)
29532953
{
29542954
_PyUnicodeWriter *_writer = (_PyUnicodeWriter*)writer;
29552955

0 commit comments

Comments
 (0)