mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 03:44:55 +00:00 
			
		
		
		
	# In case BINARY_SUBSCR, use proper PyList_GET* macros instead of inlining.
This commit is contained in:
		
							parent
							
								
									7859f87fdb
								
							
						
					
					
						commit
						fa00e958fd
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -849,15 +849,15 @@ eval_code2(co, globals, locals,
 | 
				
			||||||
				/* INLINE: list[int] */
 | 
									/* INLINE: list[int] */
 | 
				
			||||||
				long i = PyInt_AsLong(w);
 | 
									long i = PyInt_AsLong(w);
 | 
				
			||||||
				if (i < 0)
 | 
									if (i < 0)
 | 
				
			||||||
					i += ((PyListObject*) v)->ob_size;
 | 
										i += PyList_GET_SIZE(v);
 | 
				
			||||||
				if (i < 0 ||
 | 
									if (i < 0 ||
 | 
				
			||||||
				    i >= ((PyListObject*) v)->ob_size) {
 | 
									    i >= PyList_GET_SIZE(v)) {
 | 
				
			||||||
					PyErr_SetString(PyExc_IndexError,
 | 
										PyErr_SetString(PyExc_IndexError,
 | 
				
			||||||
						"list index out of range");
 | 
											"list index out of range");
 | 
				
			||||||
					x = NULL;
 | 
										x = NULL;
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				else {
 | 
									else {
 | 
				
			||||||
					x = ((PyListObject*) v)->ob_item[i];
 | 
										x = PyList_GET_ITEM(v, i);
 | 
				
			||||||
					Py_INCREF(x);
 | 
										Py_INCREF(x);
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue