Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(9)

Delta Between Two Patch Sets: Include/code.h

Issue 25843: lambdas on the same line may incorrectly share code objects
Left Patch Set: Created 4 years, 1 month ago
Right Patch Set: Created 4 years, 1 month ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | Lib/test/test_compile.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* Definitions for bytecode */ 1 /* Definitions for bytecode */
2 2
3 #ifndef Py_LIMITED_API 3 #ifndef Py_LIMITED_API
4 #ifndef Py_CODE_H 4 #ifndef Py_CODE_H
5 #define Py_CODE_H 5 #define Py_CODE_H
6 #ifdef __cplusplus 6 #ifdef __cplusplus
7 extern "C" { 7 extern "C" {
8 #endif 8 #endif
9 9
10 /* Bytecode object */ 10 /* Bytecode object */
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 #ifndef Py_LIMITED_API 111 #ifndef Py_LIMITED_API
112 /* Update *bounds to describe the first and one-past-the-last instructions in th e 112 /* Update *bounds to describe the first and one-past-the-last instructions in th e
113 same line as lasti. Return the number of that line. 113 same line as lasti. Return the number of that line.
114 */ 114 */
115 PyAPI_FUNC(int) _PyCode_CheckLineNumber(PyCodeObject* co, 115 PyAPI_FUNC(int) _PyCode_CheckLineNumber(PyCodeObject* co,
116 int lasti, PyAddrPair *bounds); 116 int lasti, PyAddrPair *bounds);
117 117
118 /* Create a comparable key used to compare constants taking in account the 118 /* Create a comparable key used to compare constants taking in account the
119 * object type. It is used to make sure types are not coerced (e.g., float and 119 * object type. It is used to make sure types are not coerced (e.g., float and
120 * complex) _and_ to distinguish 0.0 from -0.0 e.g. on IEEE platforms */ 120 * complex) _and_ to distinguish 0.0 from -0.0 e.g. on IEEE platforms
121 PyAPI_FUNC(PyObject*) _PyCode_ConstantKey(PyObject *o); 121 *
122 * Return (type(obj), obj, ...): a tuple with variable size (at least 2 items)
123 * depending on the type and the value. The type is the first item to not
124 * compare bytes and str which can raise a BytesWarning exception. */
125 PyAPI_FUNC(PyObject*) _PyCode_ConstantKey(PyObject *obj);
122 #endif 126 #endif
123 127
124 PyAPI_FUNC(PyObject*) PyCode_Optimize(PyObject *code, PyObject* consts, 128 PyAPI_FUNC(PyObject*) PyCode_Optimize(PyObject *code, PyObject* consts,
125 PyObject *names, PyObject *lnotab); 129 PyObject *names, PyObject *lnotab);
126 130
127 #ifdef __cplusplus 131 #ifdef __cplusplus
128 } 132 }
129 #endif 133 #endif
130 #endif /* !Py_CODE_H */ 134 #endif /* !Py_CODE_H */
131 #endif /* Py_LIMITED_API */ 135 #endif /* Py_LIMITED_API */
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+