mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	gh-94808: _PyLineTable_StartsLine was not used (GH-96609)
				
					
				
			This commit is contained in:
		
							parent
							
								
									64fe343717
								
							
						
					
					
						commit
						e990c6af08
					
				
					 1 changed files with 0 additions and 27 deletions
				
			
		|  | @ -1011,33 +1011,6 @@ _PyLineTable_NextAddressRange(PyCodeAddressRange *range) | ||||||
|     return 1; |     return 1; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| int |  | ||||||
| _PyLineTable_StartsLine(PyCodeAddressRange *range) |  | ||||||
| { |  | ||||||
|     if (range->ar_start <= 0) { |  | ||||||
|         return 0; |  | ||||||
|     } |  | ||||||
|     const uint8_t *ptr = range->opaque.lo_next; |  | ||||||
|     do { |  | ||||||
|         ptr--; |  | ||||||
|     } while (((*ptr) & 128) == 0); |  | ||||||
|     int code = ((*ptr)>> 3) & 15; |  | ||||||
|     switch(code) { |  | ||||||
|         case PY_CODE_LOCATION_INFO_LONG: |  | ||||||
|             return 0; |  | ||||||
|         case PY_CODE_LOCATION_INFO_NO_COLUMNS: |  | ||||||
|         case PY_CODE_LOCATION_INFO_NONE: |  | ||||||
|             return ptr[1] != 0; |  | ||||||
|         case PY_CODE_LOCATION_INFO_ONE_LINE0: |  | ||||||
|             return 0; |  | ||||||
|         case PY_CODE_LOCATION_INFO_ONE_LINE1: |  | ||||||
|         case PY_CODE_LOCATION_INFO_ONE_LINE2: |  | ||||||
|             return 1; |  | ||||||
|         default: |  | ||||||
|             return 0; |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| static int | static int | ||||||
| emit_pair(PyObject **bytes, int *offset, int a, int b) | emit_pair(PyObject **bytes, int *offset, int a, int b) | ||||||
| { | { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Nikita Sobolev
						Nikita Sobolev