]> granicus.if.org Git - python/commit
Rewrite RunMainFromImporter()
authorVictor Stinner <victor.stinner@haypocalc.com>
Wed, 6 Oct 2010 23:24:57 +0000 (23:24 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Wed, 6 Oct 2010 23:24:57 +0000 (23:24 +0000)
commit4726e40e00ad9c2e333c4dfc5005f410a520834c
treec696aaf5ed4c27d43d37049fd54ce8c8c843080d
parentc08ec9fdbaeabb2cedf1245f857a310bdceea7cc
Rewrite RunMainFromImporter()

 * 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
Modules/main.c