[Python-checkins] cpython: just start with an int rather than casting

benjamin.peterson python-checkins at python.org
Fri Sep 9 22:31:34 EDT 2016


https://hg.python.org/cpython/rev/1dd0e5b8f8ef
changeset:   103532:1dd0e5b8f8ef
user:        Benjamin Peterson <benjamin at python.org>
date:        Fri Sep 09 19:31:12 2016 -0700
summary:
  just start with an int rather than casting

files:
  Python/ast.c |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Python/ast.c b/Python/ast.c
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -4326,7 +4326,7 @@
     const char *expr_end;
     expr_ty simple_expression;
     expr_ty format_spec = NULL; /* Optional format specifier. */
-    char conversion = -1; /* The conversion char. -1 if not specified. */
+    int conversion = -1; /* The conversion char. -1 if not specified. */
 
     /* 0 if we're not in a string, else the quote char we're trying to
        match (single or double quote). */
@@ -4502,7 +4502,7 @@
 
     /* And now create the FormattedValue node that represents this
        entire expression with the conversion and format spec. */
-    *expression = FormattedValue(simple_expression, (int)conversion,
+    *expression = FormattedValue(simple_expression, conversion,
                                  format_spec, LINENO(n), n->n_col_offset,
                                  c->c_arena);
     if (!*expression)

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list