mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	Fix MSVC warning in frameobject.c (GH-20590)
This commit is contained in:
		
							parent
							
								
									586be6f3ff
								
							
						
					
					
						commit
						6e23a9c82b
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -397,7 +397,9 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno, void *Py_UNUSED(ignore
 | 
			
		|||
        return -1;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    int len = PyBytes_GET_SIZE(f->f_code->co_code)/sizeof(_Py_CODEUNIT);
 | 
			
		||||
    int len = Py_SAFE_DOWNCAST(
 | 
			
		||||
        PyBytes_GET_SIZE(f->f_code->co_code)/sizeof(_Py_CODEUNIT),
 | 
			
		||||
        Py_ssize_t, int);
 | 
			
		||||
    int *lines = marklines(f->f_code, len);
 | 
			
		||||
    if (lines == NULL) {
 | 
			
		||||
        return -1;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue