[Python-checkins] r61930 - in python/branches/trunk-bytearray: Modules/main.c Python/pythonrun.c

christian.heimes python-checkins at python.org
Wed Mar 26 12:46:19 CET 2008


Author: christian.heimes
Date: Wed Mar 26 12:46:18 2008
New Revision: 61930

Modified:
   python/branches/trunk-bytearray/Modules/main.c
   python/branches/trunk-bytearray/Python/pythonrun.c
Log:
Re-enabled bytes warning code

Modified: python/branches/trunk-bytearray/Modules/main.c
==============================================================================
--- python/branches/trunk-bytearray/Modules/main.c	(original)
+++ python/branches/trunk-bytearray/Modules/main.c	Wed Mar 26 12:46:18 2008
@@ -40,7 +40,7 @@
 static int  orig_argc;
 
 /* command line options */
-#define BASE_OPTS "3Bc:dEhim:OQ:StuUvVW:xX?"
+#define BASE_OPTS "3bBc:dEhim:OQ:StuUvVW:xX?"
 
 #ifndef RISCOS
 #define PROGRAM_OPTS BASE_OPTS
@@ -296,6 +296,9 @@
 		}
 
 		switch (c) {
+		case 'b':
+			Py_BytesWarningFlag++;
+			break;
 
 		case 'd':
 			Py_DebugFlag++;

Modified: python/branches/trunk-bytearray/Python/pythonrun.c
==============================================================================
--- python/branches/trunk-bytearray/Python/pythonrun.c	(original)
+++ python/branches/trunk-bytearray/Python/pythonrun.c	Wed Mar 26 12:46:18 2008
@@ -258,7 +258,6 @@
 	if (!warnings_module) {
 		PyErr_Clear();
 	}
-#if 0
 	else {
 		PyObject *o;
 		char *action[8];
@@ -278,7 +277,6 @@
 				      "warning filter for BytesWarning.");
 		Py_DECREF(o);
         }
-#endif
 
 #if defined(Py_USING_UNICODE) && defined(HAVE_LANGINFO_H) && defined(CODESET)
 	/* On Unix, set the file system encoding according to the


More information about the Python-checkins mailing list