mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Introduced the oddly-missing PyList_CheckExact(), and used it to replace
a hard-coded type check.
This commit is contained in:
		
							parent
							
								
									e138f369e6
								
							
						
					
					
						commit
						b1c469843f
					
				
					 2 changed files with 2 additions and 1 deletions
				
			
		|  | @ -989,7 +989,7 @@ eval_frame(PyFrameObject *f) | |||
| 		case BINARY_SUBSCR: | ||||
| 			w = POP(); | ||||
| 			v = POP(); | ||||
| 			if (v->ob_type == &PyList_Type && PyInt_CheckExact(w)) { | ||||
| 			if (PyList_CheckExact(v) && PyInt_CheckExact(w)) { | ||||
| 				/* INLINE: list[int] */ | ||||
| 				long i = PyInt_AsLong(w); | ||||
| 				if (i < 0) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tim Peters
						Tim Peters