summaryrefslogtreecommitdiff
path: root/Python/modsupport.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-01-12 22:38:13 +0100
committerAntoine Pitrou <solipsis@pitrou.net>2012-01-12 22:38:13 +0100
commite8d39bb184f94f6a2f954863d1f05acc69d84ca0 (patch)
treef196e654c2e85acabf54c439ff1c2eb4980260f6 /Python/modsupport.c
parent9c3c7506cf4933840eb24ae51f3b2ec4b16fe5a0 (diff)
parent633d98d4dfcf573a9d5af2a35d07230bd08770e0 (diff)
downloadcpython-e8d39bb184f94f6a2f954863d1f05acc69d84ca0.tar.gz
test_strlit was never run
Diffstat (limited to 'Python/modsupport.c')
-rw-r--r--Python/modsupport.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/Python/modsupport.c b/Python/modsupport.c
index 85b0d66358..428914f378 100644
--- a/Python/modsupport.c
+++ b/Python/modsupport.c
@@ -148,15 +148,6 @@ do_mklist(const char **p_format, va_list *p_va, int endchar, int n, int flags)
return v;
}
-static int
-_ustrlen(Py_UNICODE *u)
-{
- int i = 0;
- Py_UNICODE *v = u;
- while (*v != 0) { i++; v++; }
- return i;
-}
-
static PyObject *
do_mktuple(const char **p_format, va_list *p_va, int endchar, int n, int flags)
{
@@ -269,7 +260,7 @@ do_mkvalue(const char **p_format, va_list *p_va, int flags)
}
else {
if (n < 0)
- n = _ustrlen(u);
+ n = Py_UNICODE_strlen(u);
v = PyUnicode_FromUnicode(u, n);
}
return v;
@@ -292,11 +283,6 @@ do_mkvalue(const char **p_format, va_list *p_va, int flags)
case 'C':
{
int i = va_arg(*p_va, int);
- if (i < 0 || i > PyUnicode_GetMax()) {
- PyErr_SetString(PyExc_OverflowError,
- "%c arg not in range(0x110000)");
- return NULL;
- }
return PyUnicode_FromOrdinal(i);
}