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

Side by Side Diff: Include/code.h

Issue 25843: lambdas on the same line may incorrectly share code objects
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:
View unified diff | Download patch
« no previous file with comments | « no previous file | Lib/test/test_compile.py » ('j') | Lib/test/test_compile.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 /* Update *bounds to describe the first and one-past-the-last instructions in th e 111 /* 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. 112 same line as lasti. Return the number of that line.
113 */ 113 */
114 #ifndef Py_LIMITED_API 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
118 /* Create a comparable object used to compare constants taking in account the
119 * object type. For example, 0 (int) and 0.0 (float) must not be seen equal
120 * even if their value is equal. +0.0 and -0.0 are also considered as
121 * different. */
122 PyAPI_FUNC(PyObject*) _PyCode_ConstantKey(PyObject *o);
117 #endif 123 #endif
118 124
119 PyAPI_FUNC(PyObject*) PyCode_Optimize(PyObject *code, PyObject* consts, 125 PyAPI_FUNC(PyObject*) PyCode_Optimize(PyObject *code, PyObject* consts,
120 PyObject *names, PyObject *lnotab); 126 PyObject *names, PyObject *lnotab);
121 127
122 #ifdef __cplusplus 128 #ifdef __cplusplus
123 } 129 }
124 #endif 130 #endif
125 #endif /* !Py_CODE_H */ 131 #endif /* !Py_CODE_H */
126 #endif /* Py_LIMITED_API */ 132 #endif /* Py_LIMITED_API */
OLDNEW
« no previous file with comments | « no previous file | Lib/test/test_compile.py » ('j') | Lib/test/test_compile.py » ('J')

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