diff Python/ceval.c @ 1207:b564bd4e57e1 legacy-trunk

* ceval.c: ifdef out the last argument passing compat hack. * Fixed memory leaks in socket, select and sv modules: mkvalue("O", v) does INCREF(v) so if v is brand new it should be XDECREF'd
author Guido van Rossum <guido@python.org>
date Fri, 05 Feb 1993 09:46:15 +0000
parents 2937897a7d8b
children c4cd0d9d8281
line wrap: on
line diff
--- a/Python/ceval.c	Fri Feb 05 09:39:16 1993 +0000
+++ b/Python/ceval.c	Fri Feb 05 09:46:15 1993 +0000
@@ -786,13 +786,6 @@
 			break;
 		
 		case UNPACK_ARG:
-			/* Implement various compatibility hacks:
-			   (a) f(a,b,...) should accept f((1,2,...))
-			   (b) f((a,b,...)) should accept f(1,2,...)
-			   (c) f(self,(a,b,...)) should accept f(x,1,2,...)
-			   Actually, (c) is dangerous, and (b) seems
-			   unnecessary, but (a) can't be missed...
-			*/
 			{
 				int n;
 				if (EMPTY()) {
@@ -809,6 +802,12 @@
 					break;
 				}
 				n = gettuplesize(v);
+#ifdef COMPAT_HACKS
+/* Implement various compatibility hacks (for 0.9.4 or earlier):
+   (a) f(a,b,...) accepts f((1,2,...))
+   (b) f((a,b,...)) accepts f(1,2,...)
+   (c) f(self,(a,b,...)) accepts f(x,1,2,...)
+*/
 				if (n == 1 && oparg != 1) {
 					/* Rule (a) */
 					w = gettupleitem(v, 0);
@@ -819,7 +818,6 @@
 						n = gettuplesize(v);
 					}
 				}
-#ifdef COMPAT_HACKS /* Compatibility hacks no longer needed (I think) */
 				else if (n != 1 && oparg == 1) {
 					/* Rule (b) */
 					PUSH(v);