mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	gh-131238: Remove pycore_object_deferred.h from pycore_object.h (#131549)
Remove also pycore_function.h from pycore_typeobject.h.
This commit is contained in:
		
							parent
							
								
									3a09986553
								
							
						
					
					
						commit
						1a082085ae
					
				
					 10 changed files with 23 additions and 20 deletions
				
			
		|  | @ -10,8 +10,9 @@ | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #include "pycore_code.h"          // _PyCode_CODE() | #include "pycore_code.h"          // _PyCode_CODE() | ||||||
| #include "pycore_structs.h"       // _PyStackRef |  | ||||||
| #include "pycore_stackref.h"      // PyStackRef_AsPyObjectBorrow() | #include "pycore_stackref.h"      // PyStackRef_AsPyObjectBorrow() | ||||||
|  | #include "pycore_stats.h"         // CALL_STAT_INC() | ||||||
|  | #include "pycore_structs.h"       // _PyStackRef | ||||||
| #include "pycore_typedefs.h"      // _PyInterpreterFrame | #include "pycore_typedefs.h"      // _PyInterpreterFrame | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -8,15 +8,17 @@ extern "C" { | ||||||
| #  error "this header requires Py_BUILD_CORE define" | #  error "this header requires Py_BUILD_CORE define" | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #include <stdbool.h> |  | ||||||
| #include "pycore_emscripten_trampoline.h" // _PyCFunction_TrampolineCall() | #include "pycore_emscripten_trampoline.h" // _PyCFunction_TrampolineCall() | ||||||
| #include "pycore_object_deferred.h" // _PyObject_HasDeferredRefcount | #include "pycore_gc.h"            // _PyObject_GC_TRACK() | ||||||
| #include "pycore_pyatomic_ft_wrappers.h"  // FT_ATOMIC_STORE_PTR_RELAXED | #include "pycore_pyatomic_ft_wrappers.h" // FT_ATOMIC_LOAD_PTR_ACQUIRE() | ||||||
| #include "pycore_pystate.h"       // _PyInterpreterState_GET() | #include "pycore_pystate.h"       // _PyInterpreterState_GET() | ||||||
| #include "pycore_runtime.h"       // _PyRuntime | #include "pycore_runtime.h"       // _PyRuntime | ||||||
| #include "pycore_typeobject.h"    // _PyStaticType_GetState() | #include "pycore_typeobject.h"    // _PyStaticType_GetState() | ||||||
| #include "pycore_uniqueid.h"      // _PyObject_ThreadIncrefSlow() | #include "pycore_uniqueid.h"      // _PyObject_ThreadIncrefSlow() | ||||||
| 
 | 
 | ||||||
|  | #include <stdbool.h>              // bool | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| // This value is added to `ob_ref_shared` for objects that use deferred
 | // This value is added to `ob_ref_shared` for objects that use deferred
 | ||||||
| // reference counting so that they are not immediately deallocated when the
 | // reference counting so that they are not immediately deallocated when the
 | ||||||
| // non-deferred reference count drops to zero.
 | // non-deferred reference count drops to zero.
 | ||||||
|  |  | ||||||
|  | @ -13,11 +13,11 @@ extern "C" { | ||||||
| #  error "this header requires Py_BUILD_CORE define" | #  error "this header requires Py_BUILD_CORE define" | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #include "pycore_object_deferred.h" | #include "pycore_object.h"        // Py_DECREF_MORTAL | ||||||
| #include "pycore_object.h" | #include "pycore_object_deferred.h" // _PyObject_HasDeferredRefcount() | ||||||
|  | 
 | ||||||
|  | #include <stdbool.h>              // bool | ||||||
| 
 | 
 | ||||||
| #include <stddef.h> |  | ||||||
| #include <stdbool.h> |  | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|   This file introduces a new API for handling references on the stack, called |   This file introduces a new API for handling references on the stack, called | ||||||
|  |  | ||||||
|  | @ -8,10 +8,8 @@ extern "C" { | ||||||
| #  error "this header requires Py_BUILD_CORE define" | #  error "this header requires Py_BUILD_CORE define" | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #include "pycore_function.h" |  | ||||||
| #include "pycore_interp_structs.h" // managed_static_type_state | #include "pycore_interp_structs.h" // managed_static_type_state | ||||||
| #include "pycore_moduleobject.h"  // PyModuleObject | #include "pycore_moduleobject.h"  // PyModuleObject | ||||||
| #include "pycore_stats.h" |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| /* state */ | /* state */ | ||||||
|  |  | ||||||
|  | @ -5,8 +5,9 @@ | ||||||
| #include "pycore_fileutils.h"     // _PyFile_Flush | #include "pycore_fileutils.h"     // _PyFile_Flush | ||||||
| #include "pycore_interp.h"        // _PyInterpreterState.threads.count | #include "pycore_interp.h"        // _PyInterpreterState.threads.count | ||||||
| #include "pycore_lock.h" | #include "pycore_lock.h" | ||||||
| #include "pycore_moduleobject.h"  // _PyModule_GetState() |  | ||||||
| #include "pycore_modsupport.h"    // _PyArg_NoKeywords() | #include "pycore_modsupport.h"    // _PyArg_NoKeywords() | ||||||
|  | #include "pycore_moduleobject.h"  // _PyModule_GetState() | ||||||
|  | #include "pycore_object_deferred.h" // _PyObject_SetDeferredRefcount() | ||||||
| #include "pycore_pylifecycle.h" | #include "pycore_pylifecycle.h" | ||||||
| #include "pycore_pystate.h"       // _PyThreadState_SetCurrent() | #include "pycore_pystate.h"       // _PyThreadState_SetCurrent() | ||||||
| #include "pycore_sysmodule.h"     // _PySys_GetOptionalAttr() | #include "pycore_sysmodule.h"     // _PySys_GetOptionalAttr() | ||||||
|  |  | ||||||
|  | @ -2,6 +2,7 @@ | ||||||
| #include "opcode.h" | #include "opcode.h" | ||||||
| 
 | 
 | ||||||
| #include "pycore_code.h"          // _PyCodeConstructor | #include "pycore_code.h"          // _PyCodeConstructor | ||||||
|  | #include "pycore_function.h"      // _PyFunction_ClearCodeByVersion() | ||||||
| #include "pycore_hashtable.h"     // _Py_hashtable_t | #include "pycore_hashtable.h"     // _Py_hashtable_t | ||||||
| #include "pycore_index_pool.h"    // _PyIndexPool_Fini() | #include "pycore_index_pool.h"    // _PyIndexPool_Fini() | ||||||
| #include "pycore_initconfig.h"    // _PyStatus_OK() | #include "pycore_initconfig.h"    // _PyStatus_OK() | ||||||
|  |  | ||||||
|  | @ -8,6 +8,7 @@ | ||||||
| #include "pycore_descrobject.h"   // _PyMethodWrapper_Type | #include "pycore_descrobject.h"   // _PyMethodWrapper_Type | ||||||
| #include "pycore_modsupport.h"    // _PyArg_UnpackStack() | #include "pycore_modsupport.h"    // _PyArg_UnpackStack() | ||||||
| #include "pycore_object.h"        // _PyObject_GC_UNTRACK() | #include "pycore_object.h"        // _PyObject_GC_UNTRACK() | ||||||
|  | #include "pycore_object_deferred.h" // _PyObject_SetDeferredRefcount() | ||||||
| #include "pycore_pystate.h"       // _PyThreadState_GET() | #include "pycore_pystate.h"       // _PyThreadState_GET() | ||||||
| #include "pycore_tuple.h"         // _PyTuple_ITEMS() | #include "pycore_tuple.h"         // _PyTuple_ITEMS() | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,12 +1,12 @@ | ||||||
| 
 |  | ||||||
| /* Function object implementation */ | /* Function object implementation */ | ||||||
| 
 | 
 | ||||||
| #include "Python.h" | #include "Python.h" | ||||||
| #include "pycore_dict.h"                // _Py_INCREF_DICT() | #include "pycore_dict.h"          // _Py_INCREF_DICT() | ||||||
| #include "pycore_long.h"                // _PyLong_GetOne() | #include "pycore_function.h"      // _PyFunction_Vectorcall | ||||||
| #include "pycore_modsupport.h"          // _PyArg_NoKeywords() | #include "pycore_long.h"          // _PyLong_GetOne() | ||||||
| #include "pycore_object.h"              // _PyObject_GC_UNTRACK() | #include "pycore_modsupport.h"    // _PyArg_NoKeywords() | ||||||
| #include "pycore_pyerrors.h"            // _PyErr_Occurred() | #include "pycore_object.h"        // _PyObject_GC_UNTRACK() | ||||||
|  | #include "pycore_pyerrors.h"      // _PyErr_Occurred() | ||||||
| #include "pycore_stats.h" | #include "pycore_stats.h" | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,3 @@ | ||||||
| 
 |  | ||||||
| /* Module object implementation */ | /* Module object implementation */ | ||||||
| 
 | 
 | ||||||
| #include "Python.h" | #include "Python.h" | ||||||
|  |  | ||||||
|  | @ -1,14 +1,14 @@ | ||||||
| /* Python's malloc wrappers (see pymem.h) */ | /* Python's malloc wrappers (see pymem.h) */ | ||||||
| 
 | 
 | ||||||
| #include "Python.h" | #include "Python.h" | ||||||
| #include "pycore_code.h"          // stats |  | ||||||
| #include "pycore_interp.h"        // _PyInterpreterState_HasFeature | #include "pycore_interp.h"        // _PyInterpreterState_HasFeature | ||||||
| #include "pycore_object.h"        // _PyDebugAllocatorStats() definition | #include "pycore_object.h"        // _PyDebugAllocatorStats() definition | ||||||
| #include "pycore_obmalloc.h" | #include "pycore_obmalloc.h" | ||||||
|  | #include "pycore_obmalloc_init.h" | ||||||
| #include "pycore_pyerrors.h"      // _Py_FatalErrorFormat() | #include "pycore_pyerrors.h"      // _Py_FatalErrorFormat() | ||||||
| #include "pycore_pymem.h" | #include "pycore_pymem.h" | ||||||
| #include "pycore_pystate.h"       // _PyInterpreterState_GET | #include "pycore_pystate.h"       // _PyInterpreterState_GET | ||||||
| #include "pycore_obmalloc_init.h" | #include "pycore_stats.h"         // OBJECT_STAT_INC_COND() | ||||||
| 
 | 
 | ||||||
| #include <stdlib.h>               // malloc() | #include <stdlib.h>               // malloc() | ||||||
| #include <stdbool.h> | #include <stdbool.h> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner