Remove the ability to use (from C) arbitrary objects supporting the
read buffer interface as the co_code member of code objects.
#define FUTURE_GENERATORS "generators"
#define FUTURE_DIVISION "division"
-/* for internal use only */
-#define _PyCode_GETCODEPTR(co, pp) \
- ((*(co)->co_code->ob_type->tp_as_buffer->bf_getreadbuffer) \
- ((co)->co_code, 0, (void **)(pp)))
-
#ifdef __cplusplus
}
#endif
Core and builtins
-----------------
+- Support for arbitrary objects supporting the read-only buffer
+ interface as the co_code field of code objects (something that was
+ only possible to create from C code) has been removed.
+
- Made omitted callback and None equivalent for weakref.ref() and
weakref.proxy(); the None case wasn't handled correctly in all
cases.
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