diff Python/ceval.c @ 31514:545229dfd909 legacy-trunk

This is my patch #876198 plus a NEWS entry and a header frob. Remove the ability to use (from C) arbitrary objects supporting the read buffer interface as the co_code member of code objects.
author Michael W. Hudson <mwh@python.net>
date Thu, 12 Feb 2004 15:28:27 +0000
parents 2abc52c3d4c2
children fd2103ae6f29
line wrap: on
line diff
--- a/Python/ceval.c	Thu Feb 12 14:35:18 2004 +0000
+++ b/Python/ceval.c	Thu Feb 12 15:28:27 2004 +0000
@@ -754,7 +754,7 @@
 	consts = co->co_consts;
 	fastlocals = f->f_localsplus;
 	freevars = f->f_localsplus + f->f_nlocals;
-	_PyCode_GETCODEPTR(co, &first_instr);
+	first_instr = PyString_AS_STRING(co->co_code);
 	/* An explanation is in order for the next line.
 
 	   f->f_lasti now refers to the index of the last instruction