summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2007-07-18 02:28:27 +0000
committerMartin v. Löwis <martin@v.loewis.de>2007-07-18 02:28:27 +0000
commit10a60b3ec0cdf7eeac98258fc53a33b7026f8ff3 (patch)
tree533e2a67c2c082cd9534c70293977f9245425188 /Python
parent6f2df4d5e193d54244b0c2de91ef0ab1604b9243 (diff)
downloadcpython-git-10a60b3ec0cdf7eeac98258fc53a33b7026f8ff3.tar.gz
Change Py_BuildValue to generate Unicode objects for
's' and 'c' codes. Change pickle to dump bytes objects using the 'S' code, and to load the 'S' code as byte objects. Change datetime and array to generate and expect bytes objects in reduce/unreduce.
Diffstat (limited to 'Python')
-rw-r--r--Python/modsupport.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/modsupport.c b/Python/modsupport.c
index 330da5fe80..d29fe9b0a7 100644
--- a/Python/modsupport.c
+++ b/Python/modsupport.c
@@ -387,7 +387,7 @@ do_mkvalue(const char **p_format, va_list *p_va, int flags)
{
char p[1];
p[0] = (char)va_arg(*p_va, int);
- return PyString_FromStringAndSize(p, 1);
+ return PyUnicode_FromStringAndSize(p, 1);
}
case 'C':
{
@@ -438,7 +438,7 @@ do_mkvalue(const char **p_format, va_list *p_va, int flags)
}
n = (Py_ssize_t)m;
}
- v = PyString_FromStringAndSize(str, n);
+ v = PyUnicode_FromStringAndSize(str, n);
}
return v;
}