[Python-3000-checkins] r55968 - python/branches/py3k-struni/Python/compile.c

guido.van.rossum python-3000-checkins at python.org
Thu Jun 14 02:28:05 CEST 2007


Author: guido.van.rossum
Date: Thu Jun 14 02:28:01 2007
New Revision: 55968

Modified:
   python/branches/py3k-struni/Python/compile.c
Log:
Looks like an oopsie -- I ignored a warning at my peril.


Modified: python/branches/py3k-struni/Python/compile.c
==============================================================================
--- python/branches/py3k-struni/Python/compile.c	(original)
+++ python/branches/py3k-struni/Python/compile.c	Thu Jun 14 02:28:01 2007
@@ -2972,7 +2972,8 @@
 		return PyObject_IsTrue(e->v.Str.s);
 	case Name_kind:
 		/* optimize away names that can't be reassigned */
-		id = _PyUnicode_AsDefaultEncodedString(e->v.Name.id, NULL);
+		id = PyString_AS_STRING(
+                    _PyUnicode_AsDefaultEncodedString(e->v.Name.id, NULL));
 		if (strcmp(id, "True") == 0) return 1;
 		if (strcmp(id, "False") == 0) return 0;
 		if (strcmp(id, "None") == 0) return 0;


More information about the Python-3000-checkins mailing list