/
opt
/
imh
/
python3.13
/
include
/
python3.13
/
internal
/
/opt/imh/python3.13/include/python3.13/internal
mkdir
upload
Name
Size
Mode
Actions
mimalloc/
-
0755
rm
pycore_abstract.h
1915
0644
edit
dl
rm
pycore_asdl.h
3035
0644
edit
dl
rm
pycore_ast.h
31520
0644
edit
dl
rm
pycore_ast_state.h
6779
0644
edit
dl
rm
pycore_atexit.h
1433
0644
edit
dl
rm
pycore_backoff.h
3902
0644
edit
dl
rm
pycore_bitutils.h
6026
0644
edit
dl
rm
pycore_blocks_output_buffer.h
8772
0644
edit
dl
rm
pycore_brc.h
2102
0644
edit
dl
rm
pycore_bytesobject.h
5099
0644
edit
dl
rm
pycore_bytes_methods.h
3933
0644
edit
dl
rm
pycore_call.h
6135
0644
edit
dl
rm
pycore_capsule.h
397
0644
edit
dl
rm
pycore_cell.h
1057
0644
edit
dl
rm
pycore_ceval.h
11162
0644
edit
dl
rm
pycore_ceval_state.h
3921
0644
edit
dl
rm
pycore_code.h
19864
0644
edit
dl
rm
pycore_codecs.h
2465
0644
edit
dl
rm
pycore_compile.h
3750
0644
edit
dl
rm
pycore_complexobject.h
588
0644
edit
dl
rm
pycore_condvar.h
2704
0644
edit
dl
rm
pycore_context.h
1182
0644
edit
dl
rm
pycore_critical_section.h
7968
0644
edit
dl
rm
pycore_crossinterp.h
12128
0644
edit
dl
rm
pycore_descrobject.h
543
0644
edit
dl
rm
pycore_dict.h
12264
0644
edit
dl
rm
pycore_dict_state.h
732
0644
edit
dl
rm
pycore_dtoa.h
1727
0644
edit
dl
rm
pycore_emscripten_signal.h
685
0644
edit
dl
rm
pycore_emscripten_trampoline.h
3180
0644
edit
dl
rm
pycore_exceptions.h
900
0644
edit
dl
rm
pycore_faulthandler.h
2245
0644
edit
dl
rm
pycore_fileutils.h
9468
0644
edit
dl
rm
pycore_fileutils_windows.h
2713
0644
edit
dl
rm
pycore_floatobject.h
1495
0644
edit
dl
rm
pycore_flowgraph.h
1489
0644
edit
dl
rm
pycore_format.h
480
0644
edit
dl
rm
pycore_frame.h
10875
0644
edit
dl
rm
pycore_freelist.h
4810
0644
edit
dl
rm
pycore_function.h
1538
0644
edit
dl
rm
pycore_gc.h
12967
0644
edit
dl
rm
pycore_genobject.h
859
0644
edit
dl
rm
pycore_getopt.h
490
0644
edit
dl
rm
pycore_gil.h
2196
0644
edit
dl
rm
pycore_global_objects.h
3090
0644
edit
dl
rm
pycore_global_objects_fini_generated.h
117804
0644
edit
dl
rm
pycore_global_strings.h
26706
0644
edit
dl
rm
pycore_hamt.h
3742
0644
edit
dl
rm
pycore_hashtable.h
4361
0644
edit
dl
rm
pycore_identifier.h
515
0644
edit
dl
rm
pycore_import.h
7731
0644
edit
dl
rm
pycore_importdl.h
4055
0644
edit
dl
rm
pycore_initconfig.h
6375
0644
edit
dl
rm
pycore_instruction_sequence.h
2161
0644
edit
dl
rm
pycore_instruments.h
2331
0644
edit
dl
rm
pycore_interp.h
15063
0644
edit
dl
rm
pycore_intrinsics.h
1756
0644
edit
dl
rm
pycore_jit.h
527
0644
edit
dl
rm
pycore_list.h
1859
0644
edit
dl
rm
pycore_llist.h
2420
0644
edit
dl
rm
pycore_lock.h
8538
0644
edit
dl
rm
pycore_long.h
9966
0644
edit
dl
rm
pycore_memoryobject.h
427
0644
edit
dl
rm
pycore_mimalloc.h
1637
0644
edit
dl
rm
pycore_modsupport.h
3351
0644
edit
dl
rm
pycore_moduleobject.h
1572
0644
edit
dl
rm
pycore_namespace.h
435
0644
edit
dl
rm
pycore_object.h
27936
0644
edit
dl
rm
pycore_object_alloc.h
2176
0644
edit
dl
rm
pycore_object_stack.h
2384
0644
edit
dl
rm
pycore_object_state.h
942
0644
edit
dl
rm
pycore_obmalloc.h
27418
0644
edit
dl
rm
pycore_obmalloc_init.h
1935
0644
edit
dl
rm
pycore_opcode_metadata.h
84722
0644
edit
dl
rm
pycore_opcode_utils.h
2122
0644
edit
dl
rm
pycore_optimizer.h
8303
0644
edit
dl
rm
pycore_parking_lot.h
3351
0644
edit
dl
rm
pycore_parser.h
2089
0644
edit
dl
rm
pycore_pathconfig.h
658
0644
edit
dl
rm
pycore_pyarena.h
2862
0644
edit
dl
rm
pycore_pyatomic_ft_wrappers.h
8056
0644
edit
dl
rm
pycore_pybuffer.h
510
0644
edit
dl
rm
pycore_pyerrors.h
4960
0644
edit
dl
rm
pycore_pyhash.h
2813
0644
edit
dl
rm
pycore_pylifecycle.h
4465
0644
edit
dl
rm
pycore_pymath.h
8600
0644
edit
dl
rm
pycore_pymem.h
4485
0644
edit
dl
rm
pycore_pymem_init.h
3520
0644
edit
dl
rm
pycore_pystate.h
9964
0644
edit
dl
rm
pycore_pystats.h
420
0644
edit
dl
rm
pycore_pythonrun.h
758
0644
edit
dl
rm
pycore_pythread.h
5431
0644
edit
dl
rm
pycore_qsbr.h
5524
0644
edit
dl
rm
pycore_range.h
346
0644
edit
dl
rm
pycore_runtime.h
13165
0644
edit
dl
rm
pycore_runtime_init.h
13045
0644
edit
dl
rm
pycore_runtime_init_generated.h
46820
0644
edit
dl
rm
pycore_semaphore.h
1731
0644
edit
dl
rm
pycore_setobject.h
951
0644
edit
dl
rm
pycore_signal.h
2931
0644
edit
dl
rm
pycore_sliceobject.h
369
0644
edit
dl
rm
pycore_stackref.h
5186
0644
edit
dl
rm
pycore_strhex.h
1013
0644
edit
dl
rm
pycore_structseq.h
963
0644
edit
dl
rm
pycore_symtable.h
8671
0644
edit
dl
rm
pycore_sysmodule.h
1177
0644
edit
dl
rm
pycore_time.h
11794
0644
edit
dl
rm
pycore_token.h
3001
0644
edit
dl
rm
pycore_traceback.h
3629
0644
edit
dl
rm
pycore_tracemalloc.h
4533
0644
edit
dl
rm
pycore_tstate.h
1354
0644
edit
dl
rm
pycore_tuple.h
820
0644
edit
dl
rm
pycore_typeobject.h
8877
0644
edit
dl
rm
pycore_typevarobject.h
924
0644
edit
dl
rm
pycore_ucnhash.h
958
0644
edit
dl
rm
pycore_unicodeobject.h
13270
0644
edit
dl
rm
pycore_unicodeobject_generated.h
132140
0644
edit
dl
rm
pycore_unionobject.h
742
0644
edit
dl
rm
pycore_uop_ids.h
10267
0644
edit
dl
rm
pycore_uop_metadata.h
39469
0644
edit
dl
rm
pycore_warnings.h
840
0644
edit
dl
rm
pycore_weakref.h
3889
0644
edit
dl
rm
Edit:
/opt/imh/python3.13/include/python3.13/internal/pycore_typeobject.h
(8877B)
#ifndef Py_INTERNAL_TYPEOBJECT_H #define Py_INTERNAL_TYPEOBJECT_H #ifdef __cplusplus extern "C" { #endif #ifndef Py_BUILD_CORE # error "this header requires Py_BUILD_CORE define" #endif #include "pycore_moduleobject.h" // PyModuleObject #include "pycore_lock.h" // PyMutex /* state */ #define _Py_TYPE_BASE_VERSION_TAG (2<<16) #define _Py_MAX_GLOBAL_TYPE_VERSION_TAG (_Py_TYPE_BASE_VERSION_TAG - 1) /* For now we hard-code this to a value for which we are confident all the static builtin types will fit (for all builds). */ #define _Py_MAX_MANAGED_STATIC_BUILTIN_TYPES 200 #define _Py_MAX_MANAGED_STATIC_EXT_TYPES 10 #define _Py_MAX_MANAGED_STATIC_TYPES \ (_Py_MAX_MANAGED_STATIC_BUILTIN_TYPES + _Py_MAX_MANAGED_STATIC_EXT_TYPES) struct _types_runtime_state { /* Used to set PyTypeObject.tp_version_tag for core static types. */ // bpo-42745: next_version_tag remains shared by all interpreters // because of static types. unsigned int next_version_tag; struct { struct { PyTypeObject *type; int64_t interp_count; } types[_Py_MAX_MANAGED_STATIC_TYPES]; } managed_static; }; // Type attribute lookup cache: speed up attribute and method lookups, // see _PyType_Lookup(). struct type_cache_entry { unsigned int version; // initialized from type->tp_version_tag #ifdef Py_GIL_DISABLED _PySeqLock sequence; #endif PyObject *name; // reference to exactly a str or None PyObject *value; // borrowed reference or NULL }; #define MCACHE_SIZE_EXP 12 struct type_cache { struct type_cache_entry hashtable[1 << MCACHE_SIZE_EXP]; }; typedef struct { PyTypeObject *type; int isbuiltin; int readying; int ready; // XXX tp_dict can probably be statically allocated, // instead of dynamically and stored on the interpreter. PyObject *tp_dict; PyObject *tp_subclasses; /* We never clean up weakrefs for static builtin types since they will effectively never get triggered. However, there are also some diagnostic uses for the list of weakrefs, so we still keep it. */ PyObject *tp_weaklist; } managed_static_type_state; struct types_state { /* Used to set PyTypeObject.tp_version_tag. It starts at _Py_MAX_GLOBAL_TYPE_VERSION_TAG + 1, where all those lower numbers are used for core static types. */ unsigned int next_version_tag; struct type_cache type_cache; /* Every static builtin type is initialized for each interpreter during its own initialization, including for the main interpreter during global runtime initialization. This is done by calling _PyStaticType_InitBuiltin(). The first time a static builtin type is initialized, all the normal PyType_Ready() stuff happens. The only difference from normal is that there are three PyTypeObject fields holding objects which are stored here (on PyInterpreterState) rather than in the corresponding PyTypeObject fields. Those are: tp_dict (cls.__dict__), tp_subclasses (cls.__subclasses__), and tp_weaklist. When a subinterpreter is initialized, each static builtin type is still initialized, but only the interpreter-specific portion, namely those three objects. Those objects are stored in the PyInterpreterState.types.builtins array, at the index corresponding to each specific static builtin type. That index (a size_t value) is stored in the tp_subclasses field. For static builtin types, we re-purposed the now-unused tp_subclasses to avoid adding another field to PyTypeObject. In all other cases tp_subclasses holds a dict like before. (The field was previously defined as PyObject*, but is now void* to reflect its dual use.) The index for each static builtin type isn't statically assigned. Instead it is calculated the first time a type is initialized (by the main interpreter). The index matches the order in which the type was initialized relative to the others. The actual value comes from the current value of num_builtins_initialized, as each type is initialized for the main interpreter. num_builtins_initialized is incremented once for each static builtin type. Once initialization is over for a subinterpreter, the value will be the same as for all other interpreters. */ struct { size_t num_initialized; managed_static_type_state initialized[_Py_MAX_MANAGED_STATIC_BUILTIN_TYPES]; } builtins; /* We apply a similar strategy for managed extension modules. */ struct { size_t num_initialized; size_t next_index; managed_static_type_state initialized[_Py_MAX_MANAGED_STATIC_EXT_TYPES]; } for_extensions; PyMutex mutex; }; /* runtime lifecycle */ extern PyStatus _PyTypes_InitTypes(PyInterpreterState *); extern void _PyTypes_FiniTypes(PyInterpreterState *); extern void _PyTypes_FiniExtTypes(PyInterpreterState *interp); extern void _PyTypes_Fini(PyInterpreterState *); extern void _PyTypes_AfterFork(void); /* other API */ /* Length of array of slotdef pointers used to store slots with the same __name__. There should be at most MAX_EQUIV-1 slotdef entries with the same __name__, for any __name__. Since that's a static property, it is appropriate to declare fixed-size arrays for this. */ #define MAX_EQUIV 10 typedef struct wrapperbase pytype_slotdef; static inline PyObject ** _PyStaticType_GET_WEAKREFS_LISTPTR(managed_static_type_state *state) { assert(state != NULL); return &state->tp_weaklist; } extern int _PyStaticType_InitBuiltin( PyInterpreterState *interp, PyTypeObject *type); extern void _PyStaticType_FiniBuiltin( PyInterpreterState *interp, PyTypeObject *type); extern void _PyStaticType_ClearWeakRefs( PyInterpreterState *interp, PyTypeObject *type); extern managed_static_type_state * _PyStaticType_GetState( PyInterpreterState *interp, PyTypeObject *type); // Export for '_datetime' shared extension. PyAPI_FUNC(int) _PyStaticType_InitForExtension( PyInterpreterState *interp, PyTypeObject *self); /* Like PyType_GetModuleState, but skips verification * that type is a heap type with an associated module */ static inline void * _PyType_GetModuleState(PyTypeObject *type) { assert(PyType_Check(type)); assert(type->tp_flags & Py_TPFLAGS_HEAPTYPE); PyHeapTypeObject *et = (PyHeapTypeObject *)type; assert(et->ht_module); PyModuleObject *mod = (PyModuleObject *)(et->ht_module); assert(mod != NULL); return mod->md_state; } // Export for 'math' shared extension, used via _PyType_IsReady() static inline // function PyAPI_FUNC(PyObject *) _PyType_GetDict(PyTypeObject *); extern PyObject * _PyType_GetBases(PyTypeObject *type); extern PyObject * _PyType_GetMRO(PyTypeObject *type); extern PyObject* _PyType_GetSubclasses(PyTypeObject *); extern int _PyType_HasSubclasses(PyTypeObject *); PyAPI_FUNC(PyObject *) _PyType_GetModuleByDef2(PyTypeObject *, PyTypeObject *, PyModuleDef *); PyAPI_FUNC(PyObject *) _PyType_GetModuleByDef3(PyTypeObject *, PyTypeObject *, PyTypeObject *, PyModuleDef *); // PyType_Ready() must be called if _PyType_IsReady() is false. // See also the Py_TPFLAGS_READY flag. static inline int _PyType_IsReady(PyTypeObject *type) { return _PyType_GetDict(type) != NULL; } extern PyObject* _Py_type_getattro_impl(PyTypeObject *type, PyObject *name, int *suppress_missing_attribute); extern PyObject* _Py_type_getattro(PyObject *type, PyObject *name); extern PyObject* _Py_BaseObject_RichCompare(PyObject* self, PyObject* other, int op); extern PyObject* _Py_slot_tp_getattro(PyObject *self, PyObject *name); extern PyObject* _Py_slot_tp_getattr_hook(PyObject *self, PyObject *name); extern PyTypeObject _PyBufferWrapper_Type; PyAPI_FUNC(PyObject*) _PySuper_Lookup(PyTypeObject *su_type, PyObject *su_obj, PyObject *name, int *meth_found); extern PyObject* _PyType_GetFullyQualifiedName(PyTypeObject *type, char sep); // Perform the following operation, in a thread-safe way when required by the // build mode. // // self->tp_flags = (self->tp_flags & ~mask) | flags; extern void _PyType_SetFlags(PyTypeObject *self, unsigned long mask, unsigned long flags); extern int _PyType_AddMethod(PyTypeObject *, PyMethodDef *); // Like _PyType_SetFlags(), but apply the operation to self and any of its // subclasses without Py_TPFLAGS_IMMUTABLETYPE set. extern void _PyType_SetFlagsRecursive(PyTypeObject *self, unsigned long mask, unsigned long flags); #ifdef __cplusplus } #endif #endif /* !Py_INTERNAL_TYPEOBJECT_H */
Save
cmd:
run