[3.7] bpo-36254: Fix invalid uses of %d in format strings in C. (GH-12264). (GH-12322)

(cherry picked from commit d53fe5f407ff4b529628b01a1bcbf21a6aad5c3a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
diff --git a/Python/hamt.c b/Python/hamt.c
index 562f777..71a5ec8 100644
--- a/Python/hamt.c
+++ b/Python/hamt.c
@@ -2003,7 +2003,7 @@
             goto error;
         }
 
-        if (_hamt_dump_format(writer, "%d::\n", i)) {
+        if (_hamt_dump_format(writer, "%zd::\n", i)) {
             goto error;
         }