summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/Python-ast.c2
-rw-r--r--Python/errors.c2
-rw-r--r--Python/modsupport.c34
-rw-r--r--Python/sysmodule.c2
4 files changed, 4 insertions, 36 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
index 05fa541..bedd7d7 100644
--- a/Python/Python-ast.c
+++ b/Python/Python-ast.c
@@ -527,7 +527,7 @@ static PyTypeObject* make_type(char *type, PyTypeObject* base, char**fields, int
}
PyTuple_SET_ITEM(fnames, i, field);
}
- result = PyObject_CallFunction((PyObject*)&PyType_Type, "U(O){sOss}",
+ result = PyObject_CallFunction((PyObject*)&PyType_Type, "s(O){sOss}",
type, base, "_fields", fnames, "__module__", "_ast");
Py_DECREF(fnames);
return (PyTypeObject*)result;
diff --git a/Python/errors.c b/Python/errors.c
index 3766973..4ae661a 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -679,7 +679,7 @@ PyErr_NewException(const char *name, PyObject *base, PyObject *dict)
goto failure;
}
/* Create a real new-style class. */
- result = PyObject_CallFunction((PyObject *)&PyType_Type, "UOO",
+ result = PyObject_CallFunction((PyObject *)&PyType_Type, "sOO",
dot+1, bases, dict);
failure:
Py_XDECREF(bases);
diff --git a/Python/modsupport.c b/Python/modsupport.c
index a68e10b..5f5d842 100644
--- a/Python/modsupport.c
+++ b/Python/modsupport.c
@@ -302,39 +302,7 @@ do_mkvalue(const char **p_format, va_list *p_va, int flags)
case 's':
case 'z':
- {
- PyObject *v;
- char *str = va_arg(*p_va, char *);
- Py_ssize_t n;
- if (**p_format == '#') {
- ++*p_format;
- if (flags & FLAG_SIZE_T)
- n = va_arg(*p_va, Py_ssize_t);
- else
- n = va_arg(*p_va, int);
- }
- else
- n = -1;
- if (str == NULL) {
- v = Py_None;
- Py_INCREF(v);
- }
- else {
- if (n < 0) {
- size_t m = strlen(str);
- if (m > PY_SSIZE_T_MAX) {
- PyErr_SetString(PyExc_OverflowError,
- "string too long for Python string");
- return NULL;
- }
- n = (Py_ssize_t)m;
- }
- v = PyUnicode_FromStringAndSize(str, n);
- }
- return v;
- }
-
- case 'U':
+ case 'U': /* XXX deprecated alias */
{
PyObject *v;
char *str = va_arg(*p_va, char *);
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 4c87d54..f1da9730c 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -1510,7 +1510,7 @@ _PySys_Init(void)
PyLong_FromLong(PY_VERSION_HEX));
svnversion_init();
SET_SYS_FROM_STRING("subversion",
- Py_BuildValue("(UUU)", "CPython", branch,
+ Py_BuildValue("(sss)", "CPython", branch,
svn_revision));
SET_SYS_FROM_STRING("dont_write_bytecode",
PyBool_FromLong(Py_DontWriteBytecodeFlag));