mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 07:31:38 +00:00 
			
		
		
		
	Now that Jeremy is asking about this code, it looks really bogus to me,
so let's rip it out. The constructor for SyntaxError does the right thing, so we do not need to do it again.
This commit is contained in:
		
							parent
							
								
									aece4270b1
								
							
						
					
					
						commit
						b797f1f6d2
					
				
					 1 changed files with 0 additions and 18 deletions
				
			
		| 
						 | 
					@ -1096,24 +1096,6 @@ err_input(perrdetail *err)
 | 
				
			||||||
	w = Py_BuildValue("(sO)", msg, v);
 | 
						w = Py_BuildValue("(sO)", msg, v);
 | 
				
			||||||
	PyErr_SetObject(errtype, w);
 | 
						PyErr_SetObject(errtype, w);
 | 
				
			||||||
	Py_XDECREF(w);
 | 
						Py_XDECREF(w);
 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (v != NULL) {
 | 
					 | 
				
			||||||
		PyObject *exc, *tb;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		PyErr_Fetch(&errtype, &exc, &tb);
 | 
					 | 
				
			||||||
		PyErr_NormalizeException(&errtype, &exc, &tb);
 | 
					 | 
				
			||||||
		if (PyObject_SetAttrString(exc, "filename",
 | 
					 | 
				
			||||||
					   PyTuple_GET_ITEM(v, 0)))
 | 
					 | 
				
			||||||
			PyErr_Clear();
 | 
					 | 
				
			||||||
		if (PyObject_SetAttrString(exc, "lineno",
 | 
					 | 
				
			||||||
					   PyTuple_GET_ITEM(v, 1)))
 | 
					 | 
				
			||||||
			PyErr_Clear();
 | 
					 | 
				
			||||||
		if (PyObject_SetAttrString(exc, "offset",
 | 
					 | 
				
			||||||
					   PyTuple_GET_ITEM(v, 2)))
 | 
					 | 
				
			||||||
			PyErr_Clear();
 | 
					 | 
				
			||||||
		Py_DECREF(v);
 | 
					 | 
				
			||||||
		PyErr_Restore(errtype, exc, tb);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Print fatal error message and abort */
 | 
					/* Print fatal error message and abort */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue