mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	GH-115776: Embed the values array into the object, for "normal" Python objects. (GH-116115)
This commit is contained in:
		
							parent
							
								
									c97d3af239
								
							
						
					
					
						commit
						c32dc47aca
					
				
					 35 changed files with 787 additions and 537 deletions
				
			
		|  | @ -2031,11 +2031,16 @@ gc_alloc(PyTypeObject *tp, size_t basicsize, size_t presize) | |||
|     return op; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| PyObject * | ||||
| _PyObject_GC_New(PyTypeObject *tp) | ||||
| { | ||||
|     size_t presize = _PyType_PreHeaderSize(tp); | ||||
|     PyObject *op = gc_alloc(tp, _PyObject_SIZE(tp), presize); | ||||
|     size_t size = _PyObject_SIZE(tp); | ||||
|     if (_PyType_HasFeature(tp, Py_TPFLAGS_INLINE_VALUES)) { | ||||
|         size += _PyInlineValuesSize(tp); | ||||
|     } | ||||
|     PyObject *op = gc_alloc(tp, size, presize); | ||||
|     if (op == NULL) { | ||||
|         return NULL; | ||||
|     } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Mark Shannon
						Mark Shannon