diff Python/traceback.c @ 86974:954167ce92a3

Issue #19512: add some common identifiers to only create common strings once, instead of creating temporary Unicode string objects Add also more identifiers in pythonrun.c to avoid temporary Unicode string objets for the interactive interpreter.
author Victor Stinner <victor.stinner@gmail.com>
date Wed, 06 Nov 2013 22:41:44 +0100
parents cc8c37b5b449
children 01c4a0af73cf
line wrap: on
line diff
--- a/Python/traceback.c	Wed Nov 06 22:40:41 2013 +0100
+++ b/Python/traceback.c	Wed Nov 06 22:41:44 2013 +0100
@@ -169,7 +169,7 @@
         tail++;
     taillen = strlen(tail);
 
-    syspath = PySys_GetObject("path");
+    syspath = _PySys_GetObjectId(&_PyId_path);
     if (syspath == NULL || !PyList_Check(syspath))
         goto error;
     npath = PyList_Size(syspath);