mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	Remove unneeded assignment in PyBytes_Concat() (GH-15274)
The `wb.len = -1` assignment is unneeded since its introduction in 161d695fb0 as `PyObject_GetBuffer` always fills it in.
			
			
This commit is contained in:
		
							parent
							
								
									9cbb97b29e
								
							
						
					
					
						commit
						afdeb189e9
					
				
					 1 changed files with 0 additions and 1 deletions
				
			
		| 
						 | 
					@ -2935,7 +2935,6 @@ PyBytes_Concat(PyObject **pv, PyObject *w)
 | 
				
			||||||
        Py_ssize_t oldsize;
 | 
					        Py_ssize_t oldsize;
 | 
				
			||||||
        Py_buffer wb;
 | 
					        Py_buffer wb;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        wb.len = -1;
 | 
					 | 
				
			||||||
        if (PyObject_GetBuffer(w, &wb, PyBUF_SIMPLE) != 0) {
 | 
					        if (PyObject_GetBuffer(w, &wb, PyBUF_SIMPLE) != 0) {
 | 
				
			||||||
            PyErr_Format(PyExc_TypeError, "can't concat %.100s to %.100s",
 | 
					            PyErr_Format(PyExc_TypeError, "can't concat %.100s to %.100s",
 | 
				
			||||||
                         Py_TYPE(w)->tp_name, Py_TYPE(*pv)->tp_name);
 | 
					                         Py_TYPE(w)->tp_name, Py_TYPE(*pv)->tp_name);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue