• Victor Stinner's avatar
    Rewrite RunMainFromImporter() · 4726e40e
    Victor Stinner authored
     * fix argv0 reference counter if PyList_SetItem() fails
     * don't use complex if conditions, but a simple indentation and "goto error"
     * simplify error handling (remove Py_XDECREF(importer) from the error label)
     * don't set sys_path to NULL (it's useless, sys_path is a borrowed reference
       and sys_path is not a static variable)
     * try to write only one instruction per line for better readability
    4726e40e
main.c 26.9 KB