comparison Python/import.c @ 86981:3f9f2cfae53b

Issue #19512: Use the new _PyId_builtins identifier
author Victor Stinner <victor.stinner@gmail.com>
date Thu, 07 Nov 2013 00:43:05 +0100
parents 3055e61f1e66
children 01c4a0af73cf
comparison
equal deleted inserted replaced
86980:77bebcf5c4cf 86981:3f9f2cfae53b
308 deleted *last* of all, they would come too late in the normal 308 deleted *last* of all, they would come too late in the normal
309 destruction order. Sigh. */ 309 destruction order. Sigh. */
310 310
311 /* XXX Perhaps these precautions are obsolete. Who knows? */ 311 /* XXX Perhaps these precautions are obsolete. Who knows? */
312 312
313 value = PyDict_GetItemString(modules, "builtins"); 313 value = _PyDict_GetItemId(modules, &_PyId_builtins);
314 if (value != NULL && PyModule_Check(value)) { 314 if (value != NULL && PyModule_Check(value)) {
315 dict = PyModule_GetDict(value); 315 dict = PyModule_GetDict(value);
316 if (Py_VerboseFlag) 316 if (Py_VerboseFlag)
317 PySys_WriteStderr("# clear builtins._\n"); 317 PySys_WriteStderr("# clear builtins._\n");
318 PyDict_SetItemString(dict, "_", Py_None); 318 PyDict_SetItemString(dict, "_", Py_None);