Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e990c6a

Browse files
authored
gh-94808: _PyLineTable_StartsLine was not used (GH-96609)
1 parent 64fe343 commit e990c6a

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

Objects/codeobject.c

-27
Original file line numberDiff line numberDiff line change
@@ -1011,33 +1011,6 @@ _PyLineTable_NextAddressRange(PyCodeAddressRange *range)
10111011
return 1;
10121012
}
10131013

1014-
int
1015-
_PyLineTable_StartsLine(PyCodeAddressRange *range)
1016-
{
1017-
if (range->ar_start <= 0) {
1018-
return 0;
1019-
}
1020-
const uint8_t *ptr = range->opaque.lo_next;
1021-
do {
1022-
ptr--;
1023-
} while (((*ptr) & 128) == 0);
1024-
int code = ((*ptr)>> 3) & 15;
1025-
switch(code) {
1026-
case PY_CODE_LOCATION_INFO_LONG:
1027-
return 0;
1028-
case PY_CODE_LOCATION_INFO_NO_COLUMNS:
1029-
case PY_CODE_LOCATION_INFO_NONE:
1030-
return ptr[1] != 0;
1031-
case PY_CODE_LOCATION_INFO_ONE_LINE0:
1032-
return 0;
1033-
case PY_CODE_LOCATION_INFO_ONE_LINE1:
1034-
case PY_CODE_LOCATION_INFO_ONE_LINE2:
1035-
return 1;
1036-
default:
1037-
return 0;
1038-
}
1039-
}
1040-
10411014
static int
10421015
emit_pair(PyObject **bytes, int *offset, int a, int b)
10431016
{

0 commit comments

Comments
 (0)