mirror of
				https://github.com/python/cpython.git
				synced 2025-11-01 06:01:29 +00:00 
			
		
		
		
	Simplify ste_repr().
This commit is contained in:
		
							parent
							
								
									75163600de
								
							
						
					
					
						commit
						5d4ede1811
					
				
					 1 changed files with 3 additions and 7 deletions
				
			
		|  | @ -88,13 +88,9 @@ PySTEntry_New(struct symtable *st, identifier name, _Py_block_ty block, | ||||||
| static PyObject * | static PyObject * | ||||||
| ste_repr(PySTEntryObject *ste) | ste_repr(PySTEntryObject *ste) | ||||||
| { | { | ||||||
| 	char buf[256]; | 	return PyUnicode_FromFormat("<symtable entry %U(%ld), line %d>", | ||||||
| 
 | 	                            ste->ste_name, | ||||||
| 	PyOS_snprintf(buf, sizeof(buf), |  | ||||||
| 		      "<symtable entry %.100s(%ld), line %d>", |  | ||||||
| 		      PyUnicode_AsString(ste->ste_name), |  | ||||||
| 	                            PyInt_AS_LONG(ste->ste_id), ste->ste_lineno); | 	                            PyInt_AS_LONG(ste->ste_id), ste->ste_lineno); | ||||||
| 	return PyUnicode_FromString(buf); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void | static void | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Walter Dörwald
						Walter Dörwald