summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2019-05-06 16:56:51 (GMT)
committerBrett Cannon <54418+brettcannon@users.noreply.github.com>2019-05-06 16:56:50 (GMT)
commit1a2252ed39bc1b71cdaa935d7726d82909af93ab (patch)
tree7a816ef20b914628f61cce377a9b245933ff6ec9 /Objects/unicodeobject.c
parentae2c32f32b61f3b141ba4b0b1ad71781d2f9a1a1 (diff)
downloadcpython-1a2252ed39bc1b71cdaa935d7726d82909af93ab.zip
cpython-1a2252ed39bc1b71cdaa935d7726d82909af93ab.tar.gz
cpython-1a2252ed39bc1b71cdaa935d7726d82909af93ab.tar.bz2
bpo-36594: Fix incorrect use of %p in format strings (GH-12769)
In addition, fix some other minor violations of C99.
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 4d86519e8..eaba583 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -1251,7 +1251,7 @@ void *_PyUnicode_compact_data(void *unicode_raw) {
}
void *_PyUnicode_data(void *unicode_raw) {
PyObject *unicode = _PyObject_CAST(unicode_raw);
- printf("obj %p\n", unicode);
+ printf("obj %p\n", (void*)unicode);
printf("compact %d\n", PyUnicode_IS_COMPACT(unicode));
printf("compact ascii %d\n", PyUnicode_IS_COMPACT_ASCII(unicode));
printf("ascii op %p\n", ((void*)((PyASCIIObject*)(unicode) + 1)));
@@ -1282,14 +1282,14 @@ _PyUnicode_Dump(PyObject *op)
if (ascii->wstr == data)
printf("shared ");
- printf("wstr=%p", ascii->wstr);
+ printf("wstr=%p", (void *)ascii->wstr);
if (!(ascii->state.ascii == 1 && ascii->state.compact == 1)) {
printf(" (%" PY_FORMAT_SIZE_T "u), ", compact->wstr_length);
if (!ascii->state.compact && compact->utf8 == unicode->data.any)
printf("shared ");
printf("utf8=%p (%" PY_FORMAT_SIZE_T "u)",
- compact->utf8, compact->utf8_length);
+ (void *)compact->utf8, compact->utf8_length);
}
printf(", data=%p\n", data);
}