mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	SF #1015517, get readline to compile with older compilers
This commit is contained in:
		
							parent
							
								
									eb619bb80b
								
							
						
					
					
						commit
						1fa040ba73
					
				
					 1 changed files with 4 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -823,15 +823,16 @@ readline_until_enter_or_signal(char *prompt, int *signal)
 | 
			
		|||
static char *
 | 
			
		||||
call_readline(FILE *sys_stdin, FILE *sys_stdout, char *prompt)
 | 
			
		||||
{
 | 
			
		||||
	size_t n;
 | 
			
		||||
	char *p, *q;
 | 
			
		||||
	int signal;
 | 
			
		||||
 | 
			
		||||
#ifdef SAVE_LOCALE
 | 
			
		||||
	char *saved_locale = strdup(setlocale(LC_CTYPE, NULL));
 | 
			
		||||
	if (!saved_locale)
 | 
			
		||||
		Py_FatalError("not enough memory to save locale");
 | 
			
		||||
	setlocale(LC_CTYPE, "");
 | 
			
		||||
#endif
 | 
			
		||||
	size_t n;
 | 
			
		||||
	char *p, *q;
 | 
			
		||||
	int signal;
 | 
			
		||||
 | 
			
		||||
	rl_event_hook = PyOS_InputHook;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue