mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	Bug #1653736: Properly discard third argument to slot_nb_inplace_power.
Will backport.
This commit is contained in:
		
							parent
							
								
									209de1f6ca
								
							
						
					
					
						commit
						fd963265e2
					
				
					 2 changed files with 9 additions and 1 deletions
				
			
		|  | @ -4427,7 +4427,13 @@ SLOT1(slot_nb_inplace_subtract, "__isub__", PyObject *, "O") | |||
| SLOT1(slot_nb_inplace_multiply, "__imul__", PyObject *, "O") | ||||
| SLOT1(slot_nb_inplace_divide, "__idiv__", PyObject *, "O") | ||||
| SLOT1(slot_nb_inplace_remainder, "__imod__", PyObject *, "O") | ||||
| SLOT1(slot_nb_inplace_power, "__ipow__", PyObject *, "O") | ||||
| /* Can't use SLOT1 here, because nb_inplace_power is ternary */ | ||||
| static PyObject *  | ||||
| slot_nb_inplace_power(PyObject *self, PyObject * arg1, PyObject *arg2)  | ||||
| {  | ||||
|   static PyObject *cache_str;  | ||||
|   return call_method(self, "__ipow__", &cache_str, "(" "O" ")", arg1);  | ||||
| } | ||||
| SLOT1(slot_nb_inplace_lshift, "__ilshift__", PyObject *, "O") | ||||
| SLOT1(slot_nb_inplace_rshift, "__irshift__", PyObject *, "O") | ||||
| SLOT1(slot_nb_inplace_and, "__iand__", PyObject *, "O") | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Martin v. Löwis
						Martin v. Löwis