summaryrefslogtreecommitdiffstats
path: root/Modules/_struct.c
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2008-03-05 15:34:29 (GMT)
committerThomas Heller <theller@ctypes.org>2008-03-05 15:34:29 (GMT)
commitf3c0559b5e164e112d408c30e41ac2f2b06c2c85 (patch)
tree94b533057dd3841925b256ad7564f715307245a7 /Modules/_struct.c
parent78b8f4458d2189cc6c26874eec19c19a6df7ed06 (diff)
downloadcpython-f3c0559b5e164e112d408c30e41ac2f2b06c2c85.zip
cpython-f3c0559b5e164e112d408c30e41ac2f2b06c2c85.tar.gz
cpython-f3c0559b5e164e112d408c30e41ac2f2b06c2c85.tar.bz2
Issue 1872: Changed the struct module typecode from 't' to '?', for
compatibility with PEP3118.
Diffstat (limited to 'Modules/_struct.c')
-rw-r--r--Modules/_struct.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_struct.c b/Modules/_struct.c
index 8e5420c..e5fe211 100644
--- a/Modules/_struct.c
+++ b/Modules/_struct.c
@@ -799,7 +799,7 @@ static formatdef native_table[] = {
{'q', sizeof(PY_LONG_LONG), LONG_LONG_ALIGN, nu_longlong, np_longlong},
{'Q', sizeof(PY_LONG_LONG), LONG_LONG_ALIGN, nu_ulonglong,np_ulonglong},
#endif
- {'t', sizeof(BOOL_TYPE), BOOL_ALIGN, nu_bool, np_bool},
+ {'?', sizeof(BOOL_TYPE), BOOL_ALIGN, nu_bool, np_bool},
{'f', sizeof(float), FLOAT_ALIGN, nu_float, np_float},
{'d', sizeof(double), DOUBLE_ALIGN, nu_double, np_double},
{'P', sizeof(void *), VOID_P_ALIGN, nu_void_p, np_void_p},
@@ -1036,7 +1036,7 @@ static formatdef bigendian_table[] = {
{'L', 4, 0, bu_uint, bp_uint},
{'q', 8, 0, bu_longlong, bp_longlong},
{'Q', 8, 0, bu_ulonglong, bp_ulonglong},
- {'t', 1, 0, bu_bool, bp_bool},
+ {'?', 1, 0, bu_bool, bp_bool},
{'f', 4, 0, bu_float, bp_float},
{'d', 8, 0, bu_double, bp_double},
{0}
@@ -1255,7 +1255,7 @@ static formatdef lilendian_table[] = {
{'L', 4, 0, lu_uint, lp_uint},
{'q', 8, 0, lu_longlong, lp_longlong},
{'Q', 8, 0, lu_ulonglong, lp_ulonglong},
- {'t', 1, 0, bu_bool, bp_bool}, /* Std rep not endian dep,
+ {'?', 1, 0, bu_bool, bp_bool}, /* Std rep not endian dep,
but potentially different from native rep -- reuse bx_bool funcs. */
{'f', 4, 0, lu_float, lp_float},
{'d', 8, 0, lu_double, lp_double},