mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Teach Python/ceval.c's inlining of 'str += str' about Py_ssize_t sizes; this
was having funny effects when called on >2Gb strings ;P
This commit is contained in:
		
							parent
							
								
									4abb3660ca
								
							
						
					
					
						commit
						79cdce35de
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -4238,8 +4238,8 @@ string_concatenate(PyObject *v, PyObject *w, | |||
| 		/* Now we own the last reference to 'v', so we can resize it
 | ||||
| 		 * in-place. | ||||
| 		 */ | ||||
| 		int v_len = PyString_GET_SIZE(v); | ||||
| 		int w_len = PyString_GET_SIZE(w); | ||||
| 		Py_ssize_t v_len = PyString_GET_SIZE(v); | ||||
| 		Py_ssize_t w_len = PyString_GET_SIZE(w); | ||||
| 		if (_PyString_Resize(&v, v_len + w_len) != 0) { | ||||
| 			/* XXX if _PyString_Resize() fails, 'v' has been
 | ||||
| 			 * deallocated so it cannot be put back into 'variable'. | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Thomas Wouters
						Thomas Wouters