[issue30785] ast.c duplicates STR(CHILD)

2017-06-28 Thread Emily Morehouse
Emily Morehouse added the comment: Thanks Christopher, you are absolutely correct. There are a few ways in which this code could be optimized (and many other small optimizations probably exist elsewhere in the code). If you are interested in submitting a PR for this, you are more than welcome

[issue30785] ast.c duplicates STR(CHILD)

2017-06-27 Thread Christopher Aycock
New submission from Christopher Aycock: The function alias_for_import_name() duplicates logic starting at Python/ast.c:3237 char *sch = STR(CHILD(n, i)); strcpy(s, STR(CHILD(n, i))); s += strlen(sch); *s++ = '.'; I assume the strcpy() is supposed to use the sch value from the