mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 07:31:38 +00:00 
			
		
		
		
	Micro-optimize PyObject_GetAttrString()
w cannot be NULL so use Py_DECREF() instead of Py_XDECREF().
This commit is contained in:
		
							parent
							
								
									d5d17eb653
								
							
						
					
					
						commit
						59af08f545
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -820,7 +820,7 @@ PyObject_GetAttrString(PyObject *v, const char *name)
 | 
				
			||||||
    if (w == NULL)
 | 
					    if (w == NULL)
 | 
				
			||||||
        return NULL;
 | 
					        return NULL;
 | 
				
			||||||
    res = PyObject_GetAttr(v, w);
 | 
					    res = PyObject_GetAttr(v, w);
 | 
				
			||||||
    Py_XDECREF(w);
 | 
					    Py_DECREF(w);
 | 
				
			||||||
    return res;
 | 
					    return res;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue