mirror of
				https://github.com/python/cpython.git
				synced 2025-11-01 06:01:29 +00:00 
			
		
		
		
	Completely get rid of PyClass and PyInstance.
(classobject.[ch] aren't empty yet because they also define PyMethod.) This breaks lots of stuff, notably cPickle. But it's a step in the right direction. I'll clean it up later. (Also a few unrelated changes, e.g. T_NONE to define a "struct member" that is always None, and simplification of __hash__ -- these are unfinished.)
This commit is contained in:
		
							parent
							
								
									d033ddf4dc
								
							
						
					
					
						commit
						50e9fb9e2d
					
				
					 22 changed files with 325 additions and 2543 deletions
				
			
		|  | @ -3409,14 +3409,8 @@ PyEval_GetFuncName(PyObject *func) | |||
| 		return PyString_AsString(((PyFunctionObject*)func)->func_name); | ||||
| 	else if (PyCFunction_Check(func)) | ||||
| 		return ((PyCFunctionObject*)func)->m_ml->ml_name; | ||||
| 	else if (PyClass_Check(func)) | ||||
| 		return PyString_AsString(((PyClassObject*)func)->cl_name); | ||||
| 	else if (PyInstance_Check(func)) { | ||||
| 		return PyString_AsString( | ||||
| 			((PyInstanceObject*)func)->in_class->cl_name); | ||||
| 	} else { | ||||
| 	else | ||||
| 		return func->ob_type->tp_name; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| const char * | ||||
|  | @ -3428,13 +3422,8 @@ PyEval_GetFuncDesc(PyObject *func) | |||
| 		return "()"; | ||||
| 	else if (PyCFunction_Check(func)) | ||||
| 		return "()"; | ||||
| 	else if (PyClass_Check(func)) | ||||
| 		return " constructor"; | ||||
| 	else if (PyInstance_Check(func)) { | ||||
| 		return " instance"; | ||||
| 	} else { | ||||
| 	else | ||||
| 		return " object"; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| static void | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Guido van Rossum
						Guido van Rossum