mirror of
https://github.com/python/cpython.git
synced 2025-09-01 14:38:00 +00:00
Remove useless argument of _PyUnicode_AsDefaultEncodedString()
This commit is contained in:
parent
6f58b6b504
commit
f3fd733f92
8 changed files with 9 additions and 13 deletions
|
@ -511,7 +511,7 @@ source_as_string(PyObject *cmd, char *funcname, char *what, PyCompilerFlags *cf)
|
|||
|
||||
if (PyUnicode_Check(cmd)) {
|
||||
cf->cf_flags |= PyCF_IGNORE_COOKIE;
|
||||
cmd = _PyUnicode_AsDefaultEncodedString(cmd, NULL);
|
||||
cmd = _PyUnicode_AsDefaultEncodedString(cmd);
|
||||
if (cmd == NULL)
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -3026,7 +3026,7 @@ expr_constant(struct compiler *c, expr_ty e)
|
|||
case Name_kind:
|
||||
/* optimize away names that can't be reassigned */
|
||||
id = PyBytes_AS_STRING(
|
||||
_PyUnicode_AsDefaultEncodedString(e->v.Name.id, NULL));
|
||||
_PyUnicode_AsDefaultEncodedString(e->v.Name.id));
|
||||
if (strcmp(id, "True") == 0) return 1;
|
||||
if (strcmp(id, "False") == 0) return 0;
|
||||
if (strcmp(id, "None") == 0) return 0;
|
||||
|
|
|
@ -551,7 +551,7 @@ convertitem(PyObject *arg, const char **p_format, va_list *p_va, int flags,
|
|||
|
||||
|
||||
#define UNICODE_DEFAULT_ENCODING(arg) \
|
||||
_PyUnicode_AsDefaultEncodedString(arg, NULL)
|
||||
_PyUnicode_AsDefaultEncodedString(arg)
|
||||
|
||||
/* Format an error message generated by convertsimple(). */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue