mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
GH-106008: Make implicit boolean conversions explicit (GH-106003)
This commit is contained in:
parent
6e9f83d9ae
commit
7b2d94d875
20 changed files with 1728 additions and 1152 deletions
|
|
@ -101,6 +101,13 @@ typedef struct {
|
|||
|
||||
#define INLINE_CACHE_ENTRIES_SEND CACHE_ENTRIES(_PySendCache)
|
||||
|
||||
typedef struct {
|
||||
uint16_t counter;
|
||||
uint16_t version[2];
|
||||
} _PyToBoolCache;
|
||||
|
||||
#define INLINE_CACHE_ENTRIES_TO_BOOL CACHE_ENTRIES(_PyToBoolCache)
|
||||
|
||||
// Borrowed references to common callables:
|
||||
struct callable_cache {
|
||||
PyObject *isinstance;
|
||||
|
|
@ -246,6 +253,7 @@ extern void _Py_Specialize_UnpackSequence(PyObject *seq, _Py_CODEUNIT *instr,
|
|||
int oparg);
|
||||
extern void _Py_Specialize_ForIter(PyObject *iter, _Py_CODEUNIT *instr, int oparg);
|
||||
extern void _Py_Specialize_Send(PyObject *receiver, _Py_CODEUNIT *instr);
|
||||
extern void _Py_Specialize_ToBool(PyObject *value, _Py_CODEUNIT *instr);
|
||||
|
||||
/* Finalizer function for static codeobjects used in deepfreeze.py */
|
||||
extern void _PyStaticCode_Fini(PyCodeObject *co);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue