mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	Partly revert ad3824a90261 and add comment about reference ownership
This commit is contained in:
		
						commit
						9c5b521c71
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		|  | @ -33,7 +33,7 @@ ste_new(struct symtable *st, identifier name, _Py_block_ty block, | |||
|     if (ste == NULL) | ||||
|         goto fail; | ||||
|     ste->ste_table = st; | ||||
|     ste->ste_id = k; | ||||
|     ste->ste_id = k; /* ste owns reference to k */ | ||||
| 
 | ||||
|     ste->ste_name = name; | ||||
|     Py_INCREF(name); | ||||
|  | @ -79,7 +79,6 @@ ste_new(struct symtable *st, identifier name, _Py_block_ty block, | |||
| 
 | ||||
|     return ste; | ||||
|  fail: | ||||
|     Py_XDECREF(k); | ||||
|     Py_XDECREF(ste); | ||||
|     return NULL; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Christian Heimes
						Christian Heimes