mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	Issue #17034: Use Py_CLEAR() in bytesobject.c.
This commit is contained in:
		
							parent
							
								
									44b8cbfcba
								
							
						
					
					
						commit
						f458a03617
					
				
					 1 changed files with 4 additions and 8 deletions
				
			
		|  | @ -2800,8 +2800,7 @@ PyBytes_Concat(register PyObject **pv, register PyObject *w) | ||||||
|     if (*pv == NULL) |     if (*pv == NULL) | ||||||
|         return; |         return; | ||||||
|     if (w == NULL) { |     if (w == NULL) { | ||||||
|         Py_DECREF(*pv); |         Py_CLEAR(*pv); | ||||||
|         *pv = NULL; |  | ||||||
|         return; |         return; | ||||||
|     } |     } | ||||||
|     v = bytes_concat(*pv, w); |     v = bytes_concat(*pv, w); | ||||||
|  | @ -3008,12 +3007,9 @@ void | ||||||
| PyBytes_Fini(void) | PyBytes_Fini(void) | ||||||
| { | { | ||||||
|     int i; |     int i; | ||||||
|     for (i = 0; i < UCHAR_MAX + 1; i++) { |     for (i = 0; i < UCHAR_MAX + 1; i++) | ||||||
|         Py_XDECREF(characters[i]); |         Py_CLEAR(characters[i]); | ||||||
|         characters[i] = NULL; |     Py_CLEAR(nullstring); | ||||||
|     } |  | ||||||
|     Py_XDECREF(nullstring); |  | ||||||
|     nullstring = NULL; |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /*********************** Bytes Iterator ****************************/ | /*********************** Bytes Iterator ****************************/ | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Serhiy Storchaka
						Serhiy Storchaka