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

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 ago
Right Patch Set: Created 4 years 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 in this code object. If you just need the line number of a frame, 101 in this code object. If you just need the line number of a frame,
102 use PyFrame_GetLineNumber() instead. */ 102 use PyFrame_GetLineNumber() instead. */
103 PyAPI_FUNC(int) PyCode_Addr2Line(PyCodeObject *, int); 103 PyAPI_FUNC(int) PyCode_Addr2Line(PyCodeObject *, int);
104 104
105 /* for internal use only */ 105 /* for internal use only */
106 typedef struct _addr_pair { 106 typedef struct _addr_pair {
107 int ap_lower; 107 int ap_lower;
108 int ap_upper; 108 int ap_upper;
109 } PyAddrPair; 109 } PyAddrPair;
110 110
111 #ifndef Py_LIMITED_API
111 /* 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
112 same line as lasti. Return the number of that line. 113 same line as lasti. Return the number of that line.
113 */ 114 */
114 #ifndef Py_LIMITED_API
storchaka 2016/01/20 19:19:01 Would be better to move #ifndef Py_LIMITED_API abo
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 object used to compare constants taking in account the 118 /* Create a comparable key used to compare constants taking in account the
119 * object type. For example, 0 (int) and 0.0 (float) must not be seen equal 119 * object type. It is used to make sure types are not coerced (e.g., float and
120 * even if their value is equal. +0.0 and -0.0 are also considered as 120 * complex) _and_ to distinguish 0.0 from -0.0 e.g. on IEEE platforms
121 * different. */ 121 *
122 PyAPI_FUNC(PyObject*) _PyCode_ConstantKey(PyObject *o); 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);
123 #endif 126 #endif
124 127
125 PyAPI_FUNC(PyObject*) PyCode_Optimize(PyObject *code, PyObject* consts, 128 PyAPI_FUNC(PyObject*) PyCode_Optimize(PyObject *code, PyObject* consts,
126 PyObject *names, PyObject *lnotab); 129 PyObject *names, PyObject *lnotab);
127 130
128 #ifdef __cplusplus 131 #ifdef __cplusplus
129 } 132 }
130 #endif 133 #endif
131 #endif /* !Py_CODE_H */ 134 #endif /* !Py_CODE_H */
132 #endif /* Py_LIMITED_API */ 135 #endif /* Py_LIMITED_API */
LEFTRIGHT

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