Skip to content

Commit 732a7f4

Browse files
committed
py/objcode: Remove co_lnotab from v2 preview.
Signed-off-by: Anson Mansfield <amansfield@mantaro.com>
1 parent 567c9c6 commit 732a7f4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

py/objcode.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ static mp_obj_tuple_t *code_consts(const mp_module_context_t *context, const mp_
6969
return consts;
7070
}
7171

72+
#if !MICROPY_PREVIEW_VERSION_2
7273
static mp_obj_t raw_code_lnotab(const mp_raw_code_t *rc) {
7374
// const mp_bytecode_prelude_t *prelude = &rc->prelude;
7475
uint start = 0;
@@ -106,6 +107,7 @@ static mp_obj_t raw_code_lnotab(const mp_raw_code_t *rc) {
106107
m_del(byte, buffer, buffer_size);
107108
return o;
108109
}
110+
#endif
109111

110112
static mp_obj_t code_colines_iter(mp_obj_t);
111113
static mp_obj_t code_colines_next(mp_obj_t);
@@ -198,12 +200,14 @@ static void code_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) {
198200
case MP_QSTR_co_names:
199201
dest[0] = MP_OBJ_FROM_PTR(o->dict_locals);
200202
break;
203+
#if !MICROPY_PREVIEW_VERSION_2
201204
case MP_QSTR_co_lnotab:
202205
if (!o->lnotab) {
203206
o->lnotab = raw_code_lnotab(rc);
204207
}
205208
dest[0] = o->lnotab;
206209
break;
210+
#endif
207211
case MP_QSTR_co_lines:
208212
dest[0] = MP_OBJ_FROM_PTR(&code_colines_obj);
209213
dest[1] = self_in;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy