summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Modules/_collectionsmodule.c2
-rw-r--r--Modules/_multiprocessing/connection.h6
-rw-r--r--Modules/_multiprocessing/multiprocessing.h1
-rw-r--r--Python/Python-ast.c2
4 files changed, 5 insertions, 6 deletions
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c
index b26470ea59..8e5142051a 100644
--- a/Modules/_collectionsmodule.c
+++ b/Modules/_collectionsmodule.c
@@ -671,7 +671,7 @@ deque_repr(PyObject *deque)
}
if (((dequeobject *)deque)->maxlen != -1)
- result = PyUnicode_FromFormat("deque(%R, maxlen=%" PY_FORMAT_SIZE_T "d)",
+ result = PyUnicode_FromFormat("deque(%R, maxlen=%zd)",
aslist, ((dequeobject *)deque)->maxlen);
else
result = PyUnicode_FromFormat("deque(%R)", aslist);
diff --git a/Modules/_multiprocessing/connection.h b/Modules/_multiprocessing/connection.h
index e422d6999f..6e823453b6 100644
--- a/Modules/_multiprocessing/connection.h
+++ b/Modules/_multiprocessing/connection.h
@@ -47,8 +47,8 @@ connection_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
return NULL;
if (handle == INVALID_HANDLE_VALUE || (Py_ssize_t)handle < 0) {
- PyErr_Format(PyExc_IOError, "invalid handle %"
- PY_FORMAT_SIZE_T "d", (Py_ssize_t)handle);
+ PyErr_Format(PyExc_IOError, "invalid handle %zd",
+ (Py_ssize_t)handle);
return NULL;
}
@@ -404,7 +404,7 @@ connection_repr(ConnectionObject *self)
static char *conn_type[] = {"read-only", "write-only", "read-write"};
assert(self->flags >= 1 && self->flags <= 3);
- return FROM_FORMAT("<%s %s, handle %" PY_FORMAT_SIZE_T "d>",
+ return FROM_FORMAT("<%s %s, handle %zd>",
conn_type[self->flags - 1],
CONNECTION_NAME, (Py_ssize_t)self->handle);
}
diff --git a/Modules/_multiprocessing/multiprocessing.h b/Modules/_multiprocessing/multiprocessing.h
index ec5042c9d6..0b327905ea 100644
--- a/Modules/_multiprocessing/multiprocessing.h
+++ b/Modules/_multiprocessing/multiprocessing.h
@@ -56,7 +56,6 @@
# define PY_SSIZE_T_MAX INT_MAX
# define PY_SSIZE_T_MIN INT_MIN
# define F_PY_SSIZE_T "i"
-# define PY_FORMAT_SIZE_T ""
# define PyInt_FromSsize_t(n) PyInt_FromLong((long)n)
#else
# define F_PY_SSIZE_T "n"
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
index 63dbc4319b..bf7e4ac1f7 100644
--- a/Python/Python-ast.c
+++ b/Python/Python-ast.c
@@ -412,7 +412,7 @@ ast_type_init(PyObject *self, PyObject *args, PyObject *kw)
if (PyTuple_GET_SIZE(args) > 0) {
if (numfields != PyTuple_GET_SIZE(args)) {
PyErr_Format(PyExc_TypeError, "%.400s constructor takes %s"
- "%" PY_FORMAT_SIZE_T "d positional argument%s",
+ "%zd positional argument%s",
Py_TYPE(self)->tp_name,
numfields == 0 ? "" : "either 0 or ",
numfields, numfields == 1 ? "" : "s");