├── .gitattributes ├── .gitignore ├── FlexSimPy.sln ├── FlexSimPy ├── FlexSimApplication.h ├── FlexSimPy.cpp ├── FlexSimPy.h ├── FlexSimPy.vcxproj ├── FlexSimPy.vcxproj.filters ├── FlexSimPy.vcxproj.user ├── PyConverter.cpp ├── PyConverter.h ├── PyPlatform.cpp ├── PyPlatform.h └── PyPlatform_.h ├── LICENSE ├── PyConnector ├── CodeSDT.h ├── PyConnector.cpp ├── PyConnector.h ├── PyConnector.vcxproj ├── PyConnector.vcxproj.filters ├── PyConnector.vcxproj.user ├── PyConnector.wxs ├── PyConnectorInstaller.sln ├── PyConnectorInstaller.wixproj ├── PyXDecRefPtr.h ├── Readme.md ├── copyheaders.bat └── copytoflexsim.bat ├── Python3.10.props ├── Python3.11.props ├── Python3.12.props ├── Python3.9.props ├── README.md ├── TestFlexSimPy ├── PostOfficeModel.fsm ├── TestFlexSimPy.py ├── TestFlexSimPy.pyproj ├── TestPyConn.fsm ├── TestPyConnector.py ├── TestSendReceive.fsm └── TestSendReceive_autosave.fsm ├── build_all_configs.bat └── python ├── 3.10 ├── include │ ├── Python.h │ ├── abstract.h │ ├── bltinmodule.h │ ├── boolobject.h │ ├── bytearrayobject.h │ ├── bytesobject.h │ ├── cellobject.h │ ├── ceval.h │ ├── classobject.h │ ├── code.h │ ├── codecs.h │ ├── compile.h │ ├── complexobject.h │ ├── context.h │ ├── cpython │ │ ├── abstract.h │ │ ├── bytearrayobject.h │ │ ├── bytesobject.h │ │ ├── ceval.h │ │ ├── code.h │ │ ├── compile.h │ │ ├── dictobject.h │ │ ├── fileobject.h │ │ ├── fileutils.h │ │ ├── frameobject.h │ │ ├── import.h │ │ ├── initconfig.h │ │ ├── interpreteridobject.h │ │ ├── listobject.h │ │ ├── methodobject.h │ │ ├── object.h │ │ ├── objimpl.h │ │ ├── odictobject.h │ │ ├── picklebufobject.h │ │ ├── pyctype.h │ │ ├── pydebug.h │ │ ├── pyerrors.h │ │ ├── pyfpe.h │ │ ├── pylifecycle.h │ │ ├── pymem.h │ │ ├── pystate.h │ │ ├── pythonrun.h │ │ ├── pytime.h │ │ ├── sysmodule.h │ │ ├── traceback.h │ │ ├── tupleobject.h │ │ └── unicodeobject.h │ ├── datetime.h │ ├── descrobject.h │ ├── dictobject.h │ ├── dynamic_annotations.h │ ├── enumobject.h │ ├── errcode.h │ ├── eval.h │ ├── exports.h │ ├── fileobject.h │ ├── fileutils.h │ ├── floatobject.h │ ├── frameobject.h │ ├── funcobject.h │ ├── genericaliasobject.h │ ├── genobject.h │ ├── import.h │ ├── internal │ │ ├── pycore_abstract.h │ │ ├── pycore_accu.h │ │ ├── pycore_asdl.h │ │ ├── pycore_ast.h │ │ ├── pycore_ast_state.h │ │ ├── pycore_atomic.h │ │ ├── pycore_atomic_funcs.h │ │ ├── pycore_bitutils.h │ │ ├── pycore_blocks_output_buffer.h │ │ ├── pycore_bytes_methods.h │ │ ├── pycore_call.h │ │ ├── pycore_ceval.h │ │ ├── pycore_code.h │ │ ├── pycore_compile.h │ │ ├── pycore_condvar.h │ │ ├── pycore_context.h │ │ ├── pycore_dtoa.h │ │ ├── pycore_fileutils.h │ │ ├── pycore_format.h │ │ ├── pycore_gc.h │ │ ├── pycore_getopt.h │ │ ├── pycore_gil.h │ │ ├── pycore_hamt.h │ │ ├── pycore_hashtable.h │ │ ├── pycore_import.h │ │ ├── pycore_initconfig.h │ │ ├── pycore_interp.h │ │ ├── pycore_list.h │ │ ├── pycore_long.h │ │ ├── pycore_moduleobject.h │ │ ├── pycore_object.h │ │ ├── pycore_parser.h │ │ ├── pycore_pathconfig.h │ │ ├── pycore_pyarena.h │ │ ├── pycore_pyerrors.h │ │ ├── pycore_pyhash.h │ │ ├── pycore_pylifecycle.h │ │ ├── pycore_pymem.h │ │ ├── pycore_pystate.h │ │ ├── pycore_runtime.h │ │ ├── pycore_structseq.h │ │ ├── pycore_symtable.h │ │ ├── pycore_sysmodule.h │ │ ├── pycore_traceback.h │ │ ├── pycore_tuple.h │ │ ├── pycore_ucnhash.h │ │ ├── pycore_unionobject.h │ │ └── pycore_warnings.h │ ├── interpreteridobject.h │ ├── intrcheck.h │ ├── iterobject.h │ ├── listobject.h │ ├── longintrepr.h │ ├── longobject.h │ ├── marshal.h │ ├── memoryobject.h │ ├── methodobject.h │ ├── modsupport.h │ ├── moduleobject.h │ ├── namespaceobject.h │ ├── object.h │ ├── objimpl.h │ ├── opcode.h │ ├── osdefs.h │ ├── osmodule.h │ ├── patchlevel.h │ ├── py_curses.h │ ├── pycapsule.h │ ├── pyconfig.h │ ├── pydtrace.h │ ├── pyerrors.h │ ├── pyexpat.h │ ├── pyframe.h │ ├── pyhash.h │ ├── pylifecycle.h │ ├── pymacconfig.h │ ├── pymacro.h │ ├── pymath.h │ ├── pymem.h │ ├── pyport.h │ ├── pystate.h │ ├── pystrcmp.h │ ├── pystrhex.h │ ├── pystrtod.h │ ├── pythonrun.h │ ├── pythread.h │ ├── rangeobject.h │ ├── setobject.h │ ├── sliceobject.h │ ├── structmember.h │ ├── structseq.h │ ├── sysmodule.h │ ├── token.h │ ├── traceback.h │ ├── tracemalloc.h │ ├── tupleobject.h │ ├── typeslots.h │ ├── unicodeobject.h │ ├── warnings.h │ └── weakrefobject.h └── lib │ ├── python3.lib │ └── python310.lib ├── 3.11 ├── include │ ├── Python.h │ ├── abstract.h │ ├── bltinmodule.h │ ├── boolobject.h │ ├── bytearrayobject.h │ ├── bytesobject.h │ ├── ceval.h │ ├── codecs.h │ ├── compile.h │ ├── complexobject.h │ ├── cpython │ │ ├── abstract.h │ │ ├── bytearrayobject.h │ │ ├── bytesobject.h │ │ ├── cellobject.h │ │ ├── ceval.h │ │ ├── classobject.h │ │ ├── code.h │ │ ├── compile.h │ │ ├── complexobject.h │ │ ├── context.h │ │ ├── descrobject.h │ │ ├── dictobject.h │ │ ├── fileobject.h │ │ ├── fileutils.h │ │ ├── floatobject.h │ │ ├── frameobject.h │ │ ├── funcobject.h │ │ ├── genobject.h │ │ ├── import.h │ │ ├── initconfig.h │ │ ├── listobject.h │ │ ├── longintrepr.h │ │ ├── longobject.h │ │ ├── methodobject.h │ │ ├── modsupport.h │ │ ├── object.h │ │ ├── objimpl.h │ │ ├── odictobject.h │ │ ├── picklebufobject.h │ │ ├── pthread_stubs.h │ │ ├── pyctype.h │ │ ├── pydebug.h │ │ ├── pyerrors.h │ │ ├── pyfpe.h │ │ ├── pyframe.h │ │ ├── pylifecycle.h │ │ ├── pymem.h │ │ ├── pystate.h │ │ ├── pythonrun.h │ │ ├── pythread.h │ │ ├── pytime.h │ │ ├── setobject.h │ │ ├── sysmodule.h │ │ ├── traceback.h │ │ ├── tupleobject.h │ │ ├── unicodeobject.h │ │ ├── warnings.h │ │ └── weakrefobject.h │ ├── datetime.h │ ├── descrobject.h │ ├── dictobject.h │ ├── dynamic_annotations.h │ ├── enumobject.h │ ├── errcode.h │ ├── exports.h │ ├── fileobject.h │ ├── fileutils.h │ ├── floatobject.h │ ├── frameobject.h │ ├── genericaliasobject.h │ ├── import.h │ ├── internal │ │ ├── pycore_abstract.h │ │ ├── pycore_accu.h │ │ ├── pycore_asdl.h │ │ ├── pycore_ast.h │ │ ├── pycore_ast_state.h │ │ ├── pycore_atomic.h │ │ ├── pycore_atomic_funcs.h │ │ ├── pycore_bitutils.h │ │ ├── pycore_blocks_output_buffer.h │ │ ├── pycore_bytes_methods.h │ │ ├── pycore_bytesobject.h │ │ ├── pycore_call.h │ │ ├── pycore_ceval.h │ │ ├── pycore_code.h │ │ ├── pycore_compile.h │ │ ├── pycore_condvar.h │ │ ├── pycore_context.h │ │ ├── pycore_dict.h │ │ ├── pycore_dtoa.h │ │ ├── pycore_emscripten_signal.h │ │ ├── pycore_exceptions.h │ │ ├── pycore_fileutils.h │ │ ├── pycore_floatobject.h │ │ ├── pycore_format.h │ │ ├── pycore_frame.h │ │ ├── pycore_function.h │ │ ├── pycore_gc.h │ │ ├── pycore_genobject.h │ │ ├── pycore_getopt.h │ │ ├── pycore_gil.h │ │ ├── pycore_global_objects.h │ │ ├── pycore_global_strings.h │ │ ├── pycore_hamt.h │ │ ├── pycore_hashtable.h │ │ ├── pycore_import.h │ │ ├── pycore_initconfig.h │ │ ├── pycore_interp.h │ │ ├── pycore_interpreteridobject.h │ │ ├── pycore_list.h │ │ ├── pycore_long.h │ │ ├── pycore_moduleobject.h │ │ ├── pycore_namespace.h │ │ ├── pycore_object.h │ │ ├── pycore_opcode.h │ │ ├── pycore_parser.h │ │ ├── pycore_pathconfig.h │ │ ├── pycore_pyarena.h │ │ ├── pycore_pyerrors.h │ │ ├── pycore_pyhash.h │ │ ├── pycore_pylifecycle.h │ │ ├── pycore_pymath.h │ │ ├── pycore_pymem.h │ │ ├── pycore_pystate.h │ │ ├── pycore_runtime.h │ │ ├── pycore_runtime_init.h │ │ ├── pycore_signal.h │ │ ├── pycore_sliceobject.h │ │ ├── pycore_strhex.h │ │ ├── pycore_structseq.h │ │ ├── pycore_symtable.h │ │ ├── pycore_sysmodule.h │ │ ├── pycore_traceback.h │ │ ├── pycore_tuple.h │ │ ├── pycore_typeobject.h │ │ ├── pycore_ucnhash.h │ │ ├── pycore_unicodeobject.h │ │ ├── pycore_unionobject.h │ │ └── pycore_warnings.h │ ├── intrcheck.h │ ├── iterobject.h │ ├── listobject.h │ ├── longobject.h │ ├── marshal.h │ ├── memoryobject.h │ ├── methodobject.h │ ├── modsupport.h │ ├── moduleobject.h │ ├── object.h │ ├── objimpl.h │ ├── opcode.h │ ├── osdefs.h │ ├── osmodule.h │ ├── patchlevel.h │ ├── py_curses.h │ ├── pybuffer.h │ ├── pycapsule.h │ ├── pyconfig.h │ ├── pydtrace.h │ ├── pyerrors.h │ ├── pyexpat.h │ ├── pyframe.h │ ├── pyhash.h │ ├── pylifecycle.h │ ├── pymacconfig.h │ ├── pymacro.h │ ├── pymath.h │ ├── pymem.h │ ├── pyport.h │ ├── pystate.h │ ├── pystrcmp.h │ ├── pystrtod.h │ ├── pythonrun.h │ ├── pythread.h │ ├── pytypedefs.h │ ├── rangeobject.h │ ├── setobject.h │ ├── sliceobject.h │ ├── structmember.h │ ├── structseq.h │ ├── sysmodule.h │ ├── token.h │ ├── traceback.h │ ├── tracemalloc.h │ ├── tupleobject.h │ ├── typeslots.h │ ├── unicodeobject.h │ ├── warnings.h │ └── weakrefobject.h └── lib │ ├── python3.lib │ └── python311.lib ├── 3.12 ├── include │ ├── Python.h │ ├── abstract.h │ ├── bltinmodule.h │ ├── boolobject.h │ ├── bytearrayobject.h │ ├── bytesobject.h │ ├── ceval.h │ ├── codecs.h │ ├── compile.h │ ├── complexobject.h │ ├── cpython │ │ ├── abstract.h │ │ ├── bytearrayobject.h │ │ ├── bytesobject.h │ │ ├── cellobject.h │ │ ├── ceval.h │ │ ├── classobject.h │ │ ├── code.h │ │ ├── compile.h │ │ ├── complexobject.h │ │ ├── context.h │ │ ├── descrobject.h │ │ ├── dictobject.h │ │ ├── fileobject.h │ │ ├── fileutils.h │ │ ├── floatobject.h │ │ ├── frameobject.h │ │ ├── funcobject.h │ │ ├── genobject.h │ │ ├── import.h │ │ ├── initconfig.h │ │ ├── interpreteridobject.h │ │ ├── listobject.h │ │ ├── longintrepr.h │ │ ├── longobject.h │ │ ├── memoryobject.h │ │ ├── methodobject.h │ │ ├── modsupport.h │ │ ├── object.h │ │ ├── objimpl.h │ │ ├── odictobject.h │ │ ├── picklebufobject.h │ │ ├── pthread_stubs.h │ │ ├── pyctype.h │ │ ├── pydebug.h │ │ ├── pyerrors.h │ │ ├── pyfpe.h │ │ ├── pyframe.h │ │ ├── pylifecycle.h │ │ ├── pymem.h │ │ ├── pystate.h │ │ ├── pythonrun.h │ │ ├── pythread.h │ │ ├── pytime.h │ │ ├── setobject.h │ │ ├── sysmodule.h │ │ ├── traceback.h │ │ ├── tupleobject.h │ │ ├── unicodeobject.h │ │ ├── warnings.h │ │ └── weakrefobject.h │ ├── datetime.h │ ├── descrobject.h │ ├── dictobject.h │ ├── dynamic_annotations.h │ ├── enumobject.h │ ├── errcode.h │ ├── exports.h │ ├── fileobject.h │ ├── fileutils.h │ ├── floatobject.h │ ├── frameobject.h │ ├── genericaliasobject.h │ ├── import.h │ ├── internal │ │ ├── pycore_abstract.h │ │ ├── pycore_asdl.h │ │ ├── pycore_ast.h │ │ ├── pycore_ast_state.h │ │ ├── pycore_atexit.h │ │ ├── pycore_atomic.h │ │ ├── pycore_atomic_funcs.h │ │ ├── pycore_bitutils.h │ │ ├── pycore_blocks_output_buffer.h │ │ ├── pycore_bytes_methods.h │ │ ├── pycore_bytesobject.h │ │ ├── pycore_call.h │ │ ├── pycore_ceval.h │ │ ├── pycore_ceval_state.h │ │ ├── pycore_code.h │ │ ├── pycore_compile.h │ │ ├── pycore_condvar.h │ │ ├── pycore_context.h │ │ ├── pycore_descrobject.h │ │ ├── pycore_dict.h │ │ ├── pycore_dict_state.h │ │ ├── pycore_dtoa.h │ │ ├── pycore_emscripten_signal.h │ │ ├── pycore_exceptions.h │ │ ├── pycore_faulthandler.h │ │ ├── pycore_fileutils.h │ │ ├── pycore_fileutils_windows.h │ │ ├── pycore_floatobject.h │ │ ├── pycore_flowgraph.h │ │ ├── pycore_format.h │ │ ├── pycore_frame.h │ │ ├── pycore_function.h │ │ ├── pycore_gc.h │ │ ├── pycore_genobject.h │ │ ├── pycore_getopt.h │ │ ├── pycore_gil.h │ │ ├── pycore_global_objects.h │ │ ├── pycore_global_objects_fini_generated.h │ │ ├── pycore_global_strings.h │ │ ├── pycore_hamt.h │ │ ├── pycore_hashtable.h │ │ ├── pycore_import.h │ │ ├── pycore_initconfig.h │ │ ├── pycore_instruments.h │ │ ├── pycore_interp.h │ │ ├── pycore_intrinsics.h │ │ ├── pycore_list.h │ │ ├── pycore_long.h │ │ ├── pycore_memoryobject.h │ │ ├── pycore_moduleobject.h │ │ ├── pycore_namespace.h │ │ ├── pycore_object.h │ │ ├── pycore_object_state.h │ │ ├── pycore_obmalloc.h │ │ ├── pycore_obmalloc_init.h │ │ ├── pycore_opcode.h │ │ ├── pycore_opcode_utils.h │ │ ├── pycore_parser.h │ │ ├── pycore_pathconfig.h │ │ ├── pycore_pyarena.h │ │ ├── pycore_pyerrors.h │ │ ├── pycore_pyhash.h │ │ ├── pycore_pylifecycle.h │ │ ├── pycore_pymath.h │ │ ├── pycore_pymem.h │ │ ├── pycore_pymem_init.h │ │ ├── pycore_pystate.h │ │ ├── pycore_pythread.h │ │ ├── pycore_range.h │ │ ├── pycore_runtime.h │ │ ├── pycore_runtime_init.h │ │ ├── pycore_runtime_init_generated.h │ │ ├── pycore_signal.h │ │ ├── pycore_sliceobject.h │ │ ├── pycore_strhex.h │ │ ├── pycore_structseq.h │ │ ├── pycore_symtable.h │ │ ├── pycore_sysmodule.h │ │ ├── pycore_time.h │ │ ├── pycore_token.h │ │ ├── pycore_traceback.h │ │ ├── pycore_tracemalloc.h │ │ ├── pycore_tuple.h │ │ ├── pycore_typeobject.h │ │ ├── pycore_typevarobject.h │ │ ├── pycore_ucnhash.h │ │ ├── pycore_unicodeobject.h │ │ ├── pycore_unicodeobject_generated.h │ │ ├── pycore_unionobject.h │ │ └── pycore_warnings.h │ ├── interpreteridobject.h │ ├── intrcheck.h │ ├── iterobject.h │ ├── listobject.h │ ├── longobject.h │ ├── marshal.h │ ├── memoryobject.h │ ├── methodobject.h │ ├── modsupport.h │ ├── moduleobject.h │ ├── object.h │ ├── objimpl.h │ ├── opcode.h │ ├── osdefs.h │ ├── osmodule.h │ ├── patchlevel.h │ ├── py_curses.h │ ├── pybuffer.h │ ├── pycapsule.h │ ├── pyconfig.h │ ├── pydtrace.h │ ├── pyerrors.h │ ├── pyexpat.h │ ├── pyframe.h │ ├── pyhash.h │ ├── pylifecycle.h │ ├── pymacconfig.h │ ├── pymacro.h │ ├── pymath.h │ ├── pymem.h │ ├── pyport.h │ ├── pystate.h │ ├── pystats.h │ ├── pystrcmp.h │ ├── pystrtod.h │ ├── pythonrun.h │ ├── pythread.h │ ├── pytypedefs.h │ ├── rangeobject.h │ ├── setobject.h │ ├── sliceobject.h │ ├── structmember.h │ ├── structseq.h │ ├── sysmodule.h │ ├── traceback.h │ ├── tracemalloc.h │ ├── tupleobject.h │ ├── typeslots.h │ ├── unicodeobject.h │ ├── warnings.h │ └── weakrefobject.h └── lib │ ├── python3.lib │ └── python312.lib └── 3.9 ├── include ├── Python-ast.h ├── Python.h ├── abstract.h ├── asdl.h ├── ast.h ├── bitset.h ├── bltinmodule.h ├── boolobject.h ├── bytearrayobject.h ├── bytesobject.h ├── cellobject.h ├── ceval.h ├── classobject.h ├── code.h ├── codecs.h ├── compile.h ├── complexobject.h ├── context.h ├── cpython │ ├── abstract.h │ ├── bytearrayobject.h │ ├── bytesobject.h │ ├── ceval.h │ ├── code.h │ ├── dictobject.h │ ├── fileobject.h │ ├── fileutils.h │ ├── frameobject.h │ ├── import.h │ ├── initconfig.h │ ├── interpreteridobject.h │ ├── listobject.h │ ├── methodobject.h │ ├── object.h │ ├── objimpl.h │ ├── pyerrors.h │ ├── pylifecycle.h │ ├── pymem.h │ ├── pystate.h │ ├── sysmodule.h │ ├── traceback.h │ ├── tupleobject.h │ └── unicodeobject.h ├── datetime.h ├── descrobject.h ├── dictobject.h ├── dynamic_annotations.h ├── enumobject.h ├── errcode.h ├── eval.h ├── exports.h ├── fileobject.h ├── fileutils.h ├── floatobject.h ├── frameobject.h ├── funcobject.h ├── genericaliasobject.h ├── genobject.h ├── graminit.h ├── grammar.h ├── import.h ├── internal │ ├── pegen_interface.h │ ├── pycore_abstract.h │ ├── pycore_accu.h │ ├── pycore_atomic.h │ ├── pycore_bytes_methods.h │ ├── pycore_byteswap.h │ ├── pycore_call.h │ ├── pycore_ceval.h │ ├── pycore_code.h │ ├── pycore_condvar.h │ ├── pycore_context.h │ ├── pycore_dtoa.h │ ├── pycore_fileutils.h │ ├── pycore_gc.h │ ├── pycore_getopt.h │ ├── pycore_gil.h │ ├── pycore_hamt.h │ ├── pycore_hashtable.h │ ├── pycore_import.h │ ├── pycore_initconfig.h │ ├── pycore_interp.h │ ├── pycore_object.h │ ├── pycore_pathconfig.h │ ├── pycore_pyerrors.h │ ├── pycore_pyhash.h │ ├── pycore_pylifecycle.h │ ├── pycore_pymem.h │ ├── pycore_pystate.h │ ├── pycore_runtime.h │ ├── pycore_sysmodule.h │ ├── pycore_traceback.h │ ├── pycore_tupleobject.h │ └── pycore_warnings.h ├── interpreteridobject.h ├── intrcheck.h ├── iterobject.h ├── listobject.h ├── longintrepr.h ├── longobject.h ├── marshal.h ├── memoryobject.h ├── methodobject.h ├── modsupport.h ├── moduleobject.h ├── namespaceobject.h ├── node.h ├── object.h ├── objimpl.h ├── odictobject.h ├── opcode.h ├── osdefs.h ├── osmodule.h ├── parsetok.h ├── patchlevel.h ├── picklebufobject.h ├── py_curses.h ├── pyarena.h ├── pycapsule.h ├── pyconfig.h ├── pyctype.h ├── pydebug.h ├── pydtrace.h ├── pyerrors.h ├── pyexpat.h ├── pyfpe.h ├── pyframe.h ├── pyhash.h ├── pylifecycle.h ├── pymacconfig.h ├── pymacro.h ├── pymath.h ├── pymem.h ├── pyport.h ├── pystate.h ├── pystrcmp.h ├── pystrhex.h ├── pystrtod.h ├── pythonrun.h ├── pythread.h ├── pytime.h ├── rangeobject.h ├── setobject.h ├── sliceobject.h ├── structmember.h ├── structseq.h ├── symtable.h ├── sysmodule.h ├── token.h ├── traceback.h ├── tracemalloc.h ├── tupleobject.h ├── typeslots.h ├── ucnhash.h ├── unicodeobject.h ├── warnings.h └── weakrefobject.h └── lib └── python39.lib /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vs 2 | x64 3 | *.dll 4 | *.exp 5 | *.pdb 6 | PyConnector310.lib 7 | out 8 | TestFlexSimPy/__pycache__ 9 | flexsimcontent 10 | PyConnector/obj 11 | wix/bin 12 | *.fsm! 13 | *.pyd 14 | *.gz 15 | *.whl 16 | *.vcxproj.user -------------------------------------------------------------------------------- /FlexSimPy/PyConverter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Python.h" 3 | #include "FlexSimDefs.h" 4 | 5 | class PyConverter { 6 | public: 7 | static PyObject* convertToPyObject(const Variant& v, bool arrayAsTuple = false); 8 | static Variant convertToVariant(PyObject* obj); 9 | static Array convertTupleToArray(PyObject* obj); 10 | }; -------------------------------------------------------------------------------- /FlexSimPy/PyPlatform.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #if defined _WINDOWS 3 | #include 4 | #endif 5 | #include 6 | 7 | namespace FlexSim { 8 | 9 | #if defined _WINDOWS 10 | typedef HMODULE DllModule; 11 | typedef HANDLE Handle; 12 | #else 13 | typedef void* DllModule; 14 | typedef void* Handle; 15 | #endif 16 | class PyPlatform { 17 | public: 18 | static DllModule getModuleHandle(const char* dllName); 19 | static void setDllDirectory(const char* dirPath); 20 | static DllModule loadLibrary(const char* dllName); 21 | 22 | 23 | void* getProcAddress(Handle hModule, const char* funcName); 24 | bool isDirectory(const char* dir); 25 | std::string findFlexSimDir(); 26 | }; 27 | 28 | extern PyPlatform pyPlatform; 29 | } -------------------------------------------------------------------------------- /FlexSimPy/PyPlatform_.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 FlexSim Software Products Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /PyConnector/CodeSDT.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "BasicClasses.h" 3 | #include "SimpleDataType.h" 4 | 5 | namespace FlexSim { 6 | 7 | class CodeSDT : public SimpleDataType 8 | { 9 | public: 10 | engine_export virtual Variant evaluate(const VariantParams& params) override final; 11 | virtual Variant evaluate(CallPoint* callPoint) { return 0; } 12 | virtual Variant evaluate(int code, TreeNode* c, TreeNode* classObj, EventDataStruct* data, TreeNode* i, CallPoint* callPoint) { return evaluate(callPoint); } 13 | virtual bool isConnected() { return false; } 14 | static bool isReturnValOverriddenByListener; 15 | static Variant overriddenReturnVal; 16 | engine_export static CodeSDT* getNonFlexScriptCode(TreeNode* node); 17 | CodeSDT* toCodeSDT() override { return this; } 18 | }; 19 | 20 | 21 | } -------------------------------------------------------------------------------- /PyConnector/PyConnector.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {efc8b3e7-993d-465a-85e4-d6835e99951c} 6 | cpp 7 | 8 | 9 | {b1fc0ca5-7df4-4703-9851-1d186428c1df} 10 | h 11 | 12 | 13 | {73441385-b1f7-4316-8590-8598c4e9acbc} 14 | 15 | 16 | 17 | 18 | Source Files 19 | 20 | 21 | Source Files 22 | 23 | 24 | 25 | 26 | Source Files 27 | 28 | 29 | Source Files 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /PyConnector/PyConnector.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /PyConnector/PyConnectorInstaller.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.32002.261 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "PyConnectorInstaller", "PyConnectorInstaller.wixproj", "{8307D27B-AA60-4DE6-B3B5-DA87A0D8F0C1}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x86 = Debug|x86 11 | Release|x86 = Release|x86 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {8307D27B-AA60-4DE6-B3B5-DA87A0D8F0C1}.Debug|x86.ActiveCfg = Debug|x86 15 | {8307D27B-AA60-4DE6-B3B5-DA87A0D8F0C1}.Debug|x86.Build.0 = Debug|x86 16 | {8307D27B-AA60-4DE6-B3B5-DA87A0D8F0C1}.Release|x86.ActiveCfg = Release|x86 17 | {8307D27B-AA60-4DE6-B3B5-DA87A0D8F0C1}.Release|x86.Build.0 = Release|x86 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {EDEA0C15-503A-4159-B5C8-35AC06B16205} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /PyConnector/PyXDecRefPtr.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Python.h" 3 | 4 | class PyXDecRefPtr 5 | { 6 | private: 7 | PyObject* object = nullptr; 8 | 9 | public: 10 | PyXDecRefPtr() = delete; 11 | PyXDecRefPtr(const PyXDecRefPtr& other) = delete; 12 | PyXDecRefPtr(PyObject* object) : object(object) {}; 13 | ~PyXDecRefPtr() { Py_XDECREF(object); } 14 | 15 | operator PyObject* () { return object; } 16 | PyObject* operator->() { return object; } 17 | }; -------------------------------------------------------------------------------- /PyConnector/Readme.md: -------------------------------------------------------------------------------- 1 | --PyConnector DLL Project-- 2 | 3 | The PyConnector project creates a dll that will bind dll-toggled nodes to python 4 | functions. 5 | 6 | The PyConnector specifically targets embedded python, but FlexSim has also been 7 | configured to bind to really any language, and this project can be seen as 8 | one example that implements such a language binding. The primary callbacks that 9 | need to be implemented on the DLL are: 10 | 11 | extern "C" void * findProc(const char* moduleName, const char* procName) 12 | Takes a module name and a function name, and returns a void*, representing 13 | some type of reference to a function 14 | 15 | extern "C" CodeSDT* bindToNode(TreeNode* node, void* proc) 16 | Takes a TreeNode and a procedure pointer (the same as was returned from 17 | findProc) and "binds" the procedure to the node. The 18 | way to do this is to define your own CodeSDT subclass that holds 19 | the procedure pointer, and save an instance of that subclass on the 20 | node's branch node. 21 | 22 | The CodeSDT subclass you create will then have its evaluate() method called 23 | whenever the node's evaluate is called, so you would handle parameter translation, 24 | code forwarding, etc. through that method. -------------------------------------------------------------------------------- /PyConnector/copyheaders.bat: -------------------------------------------------------------------------------- 1 | IF NOT EXIST ..\flexsimcontent\ ( 2 | MKDIR ..\flexsimcontent 3 | ) 4 | 5 | IF EXIST ..\..\..\program\system\include ( 6 | COPY /Y ..\..\..\program\system\include\*.h ..\flexsimcontent\ 7 | COPY /Y ..\..\..\program\system\include\*.cpp ..\flexsimcontent\ 8 | ) 9 | 10 | IF EXIST ..\..\..\program\system\lib\flexsim.lib ( 11 | COPY /Y ..\..\..\program\system\lib\flexsim.lib ..\flexsimcontent\ 12 | ) 13 | IF EXIST ..\..\..\program\system\lib\flexsim_x86.lib ( 14 | COPY /Y ..\..\..\program\system\lib\flexsim_x86.lib ..\flexsimcontent\ 15 | ) 16 | IF EXIST ..\..\..\program\system\include\flexsimcontent.lib ( 17 | COPY /Y ..\..\..\program\system\include\flexsimcontent.lib ..\flexsimcontent\ 18 | ) 19 | IF EXIST ..\..\..\program\system\include\flexsimcontent_x86.lib ( 20 | COPY /Y ..\..\..\program\system\include\flexsimcontent_x86.lib ..\flexsimcontent\ 21 | ) -------------------------------------------------------------------------------- /PyConnector/copytoflexsim.bat: -------------------------------------------------------------------------------- 1 | IF NOT EXIST %2 ( 2 | MKDIR %2 3 | ) 4 | copy /Y %1 %2 -------------------------------------------------------------------------------- /Python3.10.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 3.10 6 | 310 7 | 8 | 9 | 10 | 11 | 12 | $(PYTHON_VERSION) 13 | true 14 | 15 | 16 | $(DLL_SUFFIX) 17 | true 18 | 19 | 20 | -------------------------------------------------------------------------------- /Python3.11.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 3.11 6 | 311 7 | 8 | 9 | 10 | 11 | 12 | $(PYTHON_VERSION) 13 | true 14 | 15 | 16 | $(DLL_SUFFIX) 17 | true 18 | 19 | 20 | -------------------------------------------------------------------------------- /Python3.12.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 3.12 6 | 312 7 | 8 | 9 | 10 | 11 | 12 | $(PYTHON_VERSION) 13 | true 14 | 15 | 16 | $(DLL_SUFFIX) 17 | true 18 | 19 | 20 | -------------------------------------------------------------------------------- /Python3.9.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 3.9 6 | 39 7 | 8 | 9 | 10 | 11 | 12 | $(PYTHON_VERSION) 13 | true 14 | 15 | 16 | $(DLL_SUFFIX) 17 | true 18 | 19 | 20 | -------------------------------------------------------------------------------- /TestFlexSimPy/PostOfficeModel.fsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flexsim/FlexSimPy/79b0aed7b3e677ceb41754df2dba8cdb4a001a78/TestFlexSimPy/PostOfficeModel.fsm -------------------------------------------------------------------------------- /TestFlexSimPy/TestFlexSimPy.py: -------------------------------------------------------------------------------- 1 | print("Starting") 2 | import FlexSimPy as fp 3 | import os 4 | scriptPath = os.path.dirname(os.path.realpath(__file__)) 5 | pDir = scriptPath + "\\..\\..\\..\\program\\"; 6 | print("imported") 7 | controller = fp.launch(evaluationLicense=True, showGUI=False, programDir=pDir) 8 | print("launched") 9 | #controller.open(scriptPath + "\\PostOfficeModel.fsm") 10 | #print("opened") 11 | #controller.reset(); 12 | #print("reset") 13 | #controller.runToTime(3600); 14 | #print("time ", controller.time()); 15 | #print("PerformanceMeasure1", controller.getPerformanceMeasure("PerformanceMeasure1")); 16 | #print("Press Enter to continue"); 17 | #input(); 18 | 19 | controller.open(scriptPath + "\\TestSendReceive.fsm"); 20 | controller.reset(); 21 | controller.run(10); 22 | 23 | while controller.time() < 30: 24 | value = controller.receive(); 25 | print ("Received ", value); 26 | print("time: ", controller.time()) 27 | print(" sending ", value * 2); 28 | controller.send(value * 2); 29 | 30 | controller.stop(); 31 | output = controller.getPerformanceMeasure("Output"); 32 | print("Output: ", output) 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /TestFlexSimPy/TestPyConn.fsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flexsim/FlexSimPy/79b0aed7b3e677ceb41754df2dba8cdb4a001a78/TestFlexSimPy/TestPyConn.fsm -------------------------------------------------------------------------------- /TestFlexSimPy/TestPyConnector.py: -------------------------------------------------------------------------------- 1 | import random 2 | 3 | def ChooseItem(options): 4 | if len(options) > 0: 5 | choice = random.choice(options) 6 | return {'QueueName' : choice[4], 'ItemRank' : choice[5]} 7 | return None 8 | 9 | -------------------------------------------------------------------------------- /TestFlexSimPy/TestSendReceive.fsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flexsim/FlexSimPy/79b0aed7b3e677ceb41754df2dba8cdb4a001a78/TestFlexSimPy/TestSendReceive.fsm -------------------------------------------------------------------------------- /TestFlexSimPy/TestSendReceive_autosave.fsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flexsim/FlexSimPy/79b0aed7b3e677ceb41754df2dba8cdb4a001a78/TestFlexSimPy/TestSendReceive_autosave.fsm -------------------------------------------------------------------------------- /build_all_configs.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set msbuildpath=%1 4 | if "%msbuildpath%"=="" ( 5 | set msbuildpath="C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe" 6 | ) 7 | 8 | %msbuildpath% FlexSimPy.sln /p:Platform=x64;Configuration=Rel_3_12 /t:Rebuild 9 | %msbuildpath% FlexSimPy.sln /p:Platform=x64;Configuration=Rel_3_11 /t:Rebuild 10 | %msbuildpath% FlexSimPy.sln /p:Platform=x64;Configuration=Rel_3_10 /t:Rebuild 11 | %msbuildpath% FlexSimPy.sln /p:Platform=x64;Configuration=Rel_3_9 /t:Rebuild 12 | %msbuildpath% PyConnector\PyConnectorInstaller.sln /p:Configuration=Release /t:Rebuild 13 | -------------------------------------------------------------------------------- /python/3.10/include/bltinmodule.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_BLTINMODULE_H 2 | #define Py_BLTINMODULE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | PyAPI_DATA(PyTypeObject) PyFilter_Type; 8 | PyAPI_DATA(PyTypeObject) PyMap_Type; 9 | PyAPI_DATA(PyTypeObject) PyZip_Type; 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif /* !Py_BLTINMODULE_H */ 15 | -------------------------------------------------------------------------------- /python/3.10/include/boolobject.h: -------------------------------------------------------------------------------- 1 | /* Boolean object interface */ 2 | 3 | #ifndef Py_BOOLOBJECT_H 4 | #define Py_BOOLOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | 10 | PyAPI_DATA(PyTypeObject) PyBool_Type; 11 | 12 | #define PyBool_Check(x) Py_IS_TYPE(x, &PyBool_Type) 13 | 14 | /* Py_False and Py_True are the only two bools in existence. 15 | Don't forget to apply Py_INCREF() when returning either!!! */ 16 | 17 | /* Don't use these directly */ 18 | PyAPI_DATA(struct _longobject) _Py_FalseStruct; 19 | PyAPI_DATA(struct _longobject) _Py_TrueStruct; 20 | 21 | /* Use these macros */ 22 | #define Py_False ((PyObject *) &_Py_FalseStruct) 23 | #define Py_True ((PyObject *) &_Py_TrueStruct) 24 | 25 | // Test if an object is the True singleton, the same as "x is True" in Python. 26 | PyAPI_FUNC(int) Py_IsTrue(PyObject *x); 27 | #define Py_IsTrue(x) Py_Is((x), Py_True) 28 | 29 | // Test if an object is the False singleton, the same as "x is False" in Python. 30 | PyAPI_FUNC(int) Py_IsFalse(PyObject *x); 31 | #define Py_IsFalse(x) Py_Is((x), Py_False) 32 | 33 | /* Macros for returning Py_True or Py_False, respectively */ 34 | #define Py_RETURN_TRUE return Py_NewRef(Py_True) 35 | #define Py_RETURN_FALSE return Py_NewRef(Py_False) 36 | 37 | /* Function to return a bool from a C long */ 38 | PyAPI_FUNC(PyObject *) PyBool_FromLong(long); 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | #endif /* !Py_BOOLOBJECT_H */ 44 | -------------------------------------------------------------------------------- /python/3.10/include/cellobject.h: -------------------------------------------------------------------------------- 1 | /* Cell object interface */ 2 | #ifndef Py_LIMITED_API 3 | #ifndef Py_CELLOBJECT_H 4 | #define Py_CELLOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | typedef struct { 10 | PyObject_HEAD 11 | PyObject *ob_ref; /* Content of the cell or NULL when empty */ 12 | } PyCellObject; 13 | 14 | PyAPI_DATA(PyTypeObject) PyCell_Type; 15 | 16 | #define PyCell_Check(op) Py_IS_TYPE(op, &PyCell_Type) 17 | 18 | PyAPI_FUNC(PyObject *) PyCell_New(PyObject *); 19 | PyAPI_FUNC(PyObject *) PyCell_Get(PyObject *); 20 | PyAPI_FUNC(int) PyCell_Set(PyObject *, PyObject *); 21 | 22 | #define PyCell_GET(op) (((PyCellObject *)(op))->ob_ref) 23 | #define PyCell_SET(op, v) ((void)(((PyCellObject *)(op))->ob_ref = v)) 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | #endif /* !Py_TUPLEOBJECT_H */ 29 | #endif /* Py_LIMITED_API */ 30 | -------------------------------------------------------------------------------- /python/3.10/include/code.h: -------------------------------------------------------------------------------- 1 | /* Definitions for bytecode */ 2 | 3 | #ifndef Py_CODE_H 4 | #define Py_CODE_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | typedef struct PyCodeObject PyCodeObject; 10 | 11 | #ifndef Py_LIMITED_API 12 | # define Py_CPYTHON_CODE_H 13 | # include "cpython/code.h" 14 | # undef Py_CPYTHON_CODE_H 15 | #endif 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif /* !Py_CODE_H */ 21 | -------------------------------------------------------------------------------- /python/3.10/include/compile.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_COMPILE_H 2 | #define Py_COMPILE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | /* These definitions must match corresponding definitions in graminit.h. */ 8 | #define Py_single_input 256 9 | #define Py_file_input 257 10 | #define Py_eval_input 258 11 | #define Py_func_type_input 345 12 | 13 | /* This doesn't need to match anything */ 14 | #define Py_fstring_input 800 15 | 16 | #ifndef Py_LIMITED_API 17 | # define Py_CPYTHON_COMPILE_H 18 | # include "cpython/compile.h" 19 | # undef Py_CPYTHON_COMPILE_H 20 | #endif 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | #endif /* !Py_COMPILE_H */ 26 | -------------------------------------------------------------------------------- /python/3.10/include/cpython/bytearrayobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_BYTEARRAYOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | /* Object layout */ 6 | typedef struct { 7 | PyObject_VAR_HEAD 8 | Py_ssize_t ob_alloc; /* How many bytes allocated in ob_bytes */ 9 | char *ob_bytes; /* Physical backing buffer */ 10 | char *ob_start; /* Logical start inside ob_bytes */ 11 | Py_ssize_t ob_exports; /* How many buffer exports */ 12 | } PyByteArrayObject; 13 | 14 | /* Macros, trading safety for speed */ 15 | #define PyByteArray_AS_STRING(self) \ 16 | (assert(PyByteArray_Check(self)), \ 17 | Py_SIZE(self) ? ((PyByteArrayObject *)(self))->ob_start : _PyByteArray_empty_string) 18 | #define PyByteArray_GET_SIZE(self) (assert(PyByteArray_Check(self)), Py_SIZE(self)) 19 | 20 | PyAPI_DATA(char) _PyByteArray_empty_string[]; 21 | -------------------------------------------------------------------------------- /python/3.10/include/cpython/fileobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_FILEOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | PyAPI_FUNC(char *) Py_UniversalNewlineFgets(char *, int, FILE*, PyObject *); 6 | 7 | /* The std printer acts as a preliminary sys.stderr until the new io 8 | infrastructure is in place. */ 9 | PyAPI_FUNC(PyObject *) PyFile_NewStdPrinter(int); 10 | PyAPI_DATA(PyTypeObject) PyStdPrinter_Type; 11 | 12 | typedef PyObject * (*Py_OpenCodeHookFunction)(PyObject *, void *); 13 | 14 | PyAPI_FUNC(PyObject *) PyFile_OpenCode(const char *utf8path); 15 | PyAPI_FUNC(PyObject *) PyFile_OpenCodeObject(PyObject *path); 16 | PyAPI_FUNC(int) PyFile_SetOpenCodeHook(Py_OpenCodeHookFunction hook, void *userData); 17 | 18 | PyAPI_FUNC(int) _PyLong_FileDescriptor_Converter(PyObject *, void *); 19 | -------------------------------------------------------------------------------- /python/3.10/include/cpython/interpreteridobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_INTERPRETERIDOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | /* Interpreter ID Object */ 6 | 7 | PyAPI_DATA(PyTypeObject) _PyInterpreterID_Type; 8 | 9 | PyAPI_FUNC(PyObject *) _PyInterpreterID_New(int64_t); 10 | PyAPI_FUNC(PyObject *) _PyInterpreterState_GetIDObject(PyInterpreterState *); 11 | PyAPI_FUNC(PyInterpreterState *) _PyInterpreterID_LookUp(PyObject *); 12 | -------------------------------------------------------------------------------- /python/3.10/include/cpython/listobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_LISTOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | typedef struct { 6 | PyObject_VAR_HEAD 7 | /* Vector of pointers to list elements. list[0] is ob_item[0], etc. */ 8 | PyObject **ob_item; 9 | 10 | /* ob_item contains space for 'allocated' elements. The number 11 | * currently in use is ob_size. 12 | * Invariants: 13 | * 0 <= ob_size <= allocated 14 | * len(list) == ob_size 15 | * ob_item == NULL implies ob_size == allocated == 0 16 | * list.sort() temporarily sets allocated to -1 to detect mutations. 17 | * 18 | * Items must normally not be NULL, except during construction when 19 | * the list is not yet visible outside the function that builds it. 20 | */ 21 | Py_ssize_t allocated; 22 | } PyListObject; 23 | 24 | PyAPI_FUNC(PyObject *) _PyList_Extend(PyListObject *, PyObject *); 25 | PyAPI_FUNC(void) _PyList_DebugMallocStats(FILE *out); 26 | 27 | /* Macro, trading safety for speed */ 28 | 29 | /* Cast argument to PyListObject* type. */ 30 | #define _PyList_CAST(op) (assert(PyList_Check(op)), (PyListObject *)(op)) 31 | 32 | #define PyList_GET_ITEM(op, i) (_PyList_CAST(op)->ob_item[i]) 33 | #define PyList_SET_ITEM(op, i, v) ((void)(_PyList_CAST(op)->ob_item[i] = (v))) 34 | #define PyList_GET_SIZE(op) Py_SIZE(_PyList_CAST(op)) 35 | -------------------------------------------------------------------------------- /python/3.10/include/cpython/picklebufobject.h: -------------------------------------------------------------------------------- 1 | /* PickleBuffer object. This is built-in for ease of use from third-party 2 | * C extensions. 3 | */ 4 | 5 | #ifndef Py_PICKLEBUFOBJECT_H 6 | #define Py_PICKLEBUFOBJECT_H 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #ifndef Py_LIMITED_API 12 | 13 | PyAPI_DATA(PyTypeObject) PyPickleBuffer_Type; 14 | 15 | #define PyPickleBuffer_Check(op) Py_IS_TYPE(op, &PyPickleBuffer_Type) 16 | 17 | /* Create a PickleBuffer redirecting to the given buffer-enabled object */ 18 | PyAPI_FUNC(PyObject *) PyPickleBuffer_FromObject(PyObject *); 19 | /* Get the PickleBuffer's underlying view to the original object 20 | * (NULL if released) 21 | */ 22 | PyAPI_FUNC(const Py_buffer *) PyPickleBuffer_GetBuffer(PyObject *); 23 | /* Release the PickleBuffer. Returns 0 on success, -1 on error. */ 24 | PyAPI_FUNC(int) PyPickleBuffer_Release(PyObject *); 25 | 26 | #endif /* !Py_LIMITED_API */ 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | #endif /* !Py_PICKLEBUFOBJECT_H */ 32 | -------------------------------------------------------------------------------- /python/3.10/include/cpython/pydebug.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_LIMITED_API 2 | #ifndef Py_PYDEBUG_H 3 | #define Py_PYDEBUG_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_DATA(int) Py_DebugFlag; 9 | PyAPI_DATA(int) Py_VerboseFlag; 10 | PyAPI_DATA(int) Py_QuietFlag; 11 | PyAPI_DATA(int) Py_InteractiveFlag; 12 | PyAPI_DATA(int) Py_InspectFlag; 13 | PyAPI_DATA(int) Py_OptimizeFlag; 14 | PyAPI_DATA(int) Py_NoSiteFlag; 15 | PyAPI_DATA(int) Py_BytesWarningFlag; 16 | PyAPI_DATA(int) Py_FrozenFlag; 17 | PyAPI_DATA(int) Py_IgnoreEnvironmentFlag; 18 | PyAPI_DATA(int) Py_DontWriteBytecodeFlag; 19 | PyAPI_DATA(int) Py_NoUserSiteDirectory; 20 | PyAPI_DATA(int) Py_UnbufferedStdioFlag; 21 | PyAPI_DATA(int) Py_HashRandomizationFlag; 22 | PyAPI_DATA(int) Py_IsolatedFlag; 23 | 24 | #ifdef MS_WINDOWS 25 | PyAPI_DATA(int) Py_LegacyWindowsFSEncodingFlag; 26 | PyAPI_DATA(int) Py_LegacyWindowsStdioFlag; 27 | #endif 28 | 29 | /* this is a wrapper around getenv() that pays attention to 30 | Py_IgnoreEnvironmentFlag. It should be used for getting variables like 31 | PYTHONPATH and PYTHONHOME from the environment */ 32 | #define Py_GETENV(s) (Py_IgnoreEnvironmentFlag ? NULL : getenv(s)) 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | #endif /* !Py_PYDEBUG_H */ 38 | #endif /* Py_LIMITED_API */ 39 | -------------------------------------------------------------------------------- /python/3.10/include/cpython/pyfpe.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_PYFPE_H 2 | #define Py_PYFPE_H 3 | /* Header excluded from the stable API */ 4 | #ifndef Py_LIMITED_API 5 | 6 | /* These macros used to do something when Python was built with --with-fpectl, 7 | * but support for that was dropped in 3.7. We continue to define them though, 8 | * to avoid breaking API users. 9 | */ 10 | 11 | #define PyFPE_START_PROTECT(err_string, leave_stmt) 12 | #define PyFPE_END_PROTECT(v) 13 | 14 | #endif /* !defined(Py_LIMITED_API) */ 15 | #endif /* !Py_PYFPE_H */ 16 | -------------------------------------------------------------------------------- /python/3.10/include/cpython/sysmodule.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_SYSMODULE_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | PyAPI_FUNC(PyObject *) _PySys_GetObjectId(_Py_Identifier *key); 6 | PyAPI_FUNC(int) _PySys_SetObjectId(_Py_Identifier *key, PyObject *); 7 | 8 | PyAPI_FUNC(size_t) _PySys_GetSizeOf(PyObject *); 9 | 10 | typedef int(*Py_AuditHookFunction)(const char *, PyObject *, void *); 11 | 12 | PyAPI_FUNC(int) PySys_Audit( 13 | const char *event, 14 | const char *argFormat, 15 | ...); 16 | PyAPI_FUNC(int) PySys_AddAuditHook(Py_AuditHookFunction, void*); 17 | -------------------------------------------------------------------------------- /python/3.10/include/cpython/traceback.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_TRACEBACK_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | typedef struct _traceback { 6 | PyObject_HEAD 7 | struct _traceback *tb_next; 8 | PyFrameObject *tb_frame; 9 | int tb_lasti; 10 | int tb_lineno; 11 | } PyTracebackObject; 12 | 13 | PyAPI_FUNC(int) _Py_DisplaySourceLine(PyObject *, PyObject *, int, int); 14 | PyAPI_FUNC(void) _PyTraceback_Add(const char *, const char *, int); 15 | -------------------------------------------------------------------------------- /python/3.10/include/cpython/tupleobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_TUPLEOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | typedef struct { 6 | PyObject_VAR_HEAD 7 | /* ob_item contains space for 'ob_size' elements. 8 | Items must normally not be NULL, except during construction when 9 | the tuple is not yet visible outside the function that builds it. */ 10 | PyObject *ob_item[1]; 11 | } PyTupleObject; 12 | 13 | PyAPI_FUNC(int) _PyTuple_Resize(PyObject **, Py_ssize_t); 14 | PyAPI_FUNC(void) _PyTuple_MaybeUntrack(PyObject *); 15 | 16 | /* Macros trading safety for speed */ 17 | 18 | /* Cast argument to PyTupleObject* type. */ 19 | #define _PyTuple_CAST(op) (assert(PyTuple_Check(op)), (PyTupleObject *)(op)) 20 | 21 | #define PyTuple_GET_SIZE(op) Py_SIZE(_PyTuple_CAST(op)) 22 | 23 | #define PyTuple_GET_ITEM(op, i) (_PyTuple_CAST(op)->ob_item[i]) 24 | 25 | /* Macro, *only* to be used to fill in brand new tuples */ 26 | #define PyTuple_SET_ITEM(op, i, v) ((void)(_PyTuple_CAST(op)->ob_item[i] = v)) 27 | 28 | PyAPI_FUNC(void) _PyTuple_DebugMallocStats(FILE *out); 29 | -------------------------------------------------------------------------------- /python/3.10/include/enumobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_ENUMOBJECT_H 2 | #define Py_ENUMOBJECT_H 3 | 4 | /* Enumerate Object */ 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | PyAPI_DATA(PyTypeObject) PyEnum_Type; 11 | PyAPI_DATA(PyTypeObject) PyReversed_Type; 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | #endif /* !Py_ENUMOBJECT_H */ 18 | -------------------------------------------------------------------------------- /python/3.10/include/eval.h: -------------------------------------------------------------------------------- 1 | 2 | /* Interface to execute compiled code */ 3 | 4 | #ifndef Py_EVAL_H 5 | #define Py_EVAL_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | PyAPI_FUNC(PyObject *) PyEval_EvalCode(PyObject *, PyObject *, PyObject *); 11 | 12 | PyAPI_FUNC(PyObject *) PyEval_EvalCodeEx(PyObject *co, 13 | PyObject *globals, 14 | PyObject *locals, 15 | PyObject *const *args, int argc, 16 | PyObject *const *kwds, int kwdc, 17 | PyObject *const *defs, int defc, 18 | PyObject *kwdefs, PyObject *closure); 19 | 20 | #ifndef Py_LIMITED_API 21 | PyAPI_FUNC(PyObject *) _PyEval_CallTracing(PyObject *func, PyObject *args); 22 | #endif 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | #endif /* !Py_EVAL_H */ 28 | -------------------------------------------------------------------------------- /python/3.10/include/exports.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_EXPORTS_H 2 | #define Py_EXPORTS_H 3 | 4 | #if defined(_WIN32) || defined(__CYGWIN__) 5 | #define Py_IMPORTED_SYMBOL __declspec(dllimport) 6 | #define Py_EXPORTED_SYMBOL __declspec(dllexport) 7 | #define Py_LOCAL_SYMBOL 8 | #else 9 | /* 10 | * If we only ever used gcc >= 5, we could use __has_attribute(visibility) 11 | * as a cross-platform way to determine if visibility is supported. However, 12 | * we may still need to support gcc >= 4, as some Ubuntu LTS and Centos versions 13 | * have 4 < gcc < 5. 14 | */ 15 | #ifndef __has_attribute 16 | #define __has_attribute(x) 0 // Compatibility with non-clang compilers. 17 | #endif 18 | #if (defined(__GNUC__) && (__GNUC__ >= 4)) ||\ 19 | (defined(__clang__) && __has_attribute(visibility)) 20 | #define Py_IMPORTED_SYMBOL __attribute__ ((visibility ("default"))) 21 | #define Py_EXPORTED_SYMBOL __attribute__ ((visibility ("default"))) 22 | #define Py_LOCAL_SYMBOL __attribute__ ((visibility ("hidden"))) 23 | #else 24 | #define Py_IMPORTED_SYMBOL 25 | #define Py_EXPORTED_SYMBOL 26 | #define Py_LOCAL_SYMBOL 27 | #endif 28 | #endif 29 | 30 | #endif /* Py_EXPORTS_H */ 31 | -------------------------------------------------------------------------------- /python/3.10/include/fileutils.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_FILEUTILS_H 2 | #define Py_FILEUTILS_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000 8 | PyAPI_FUNC(wchar_t *) Py_DecodeLocale( 9 | const char *arg, 10 | size_t *size); 11 | 12 | PyAPI_FUNC(char*) Py_EncodeLocale( 13 | const wchar_t *text, 14 | size_t *error_pos); 15 | #endif 16 | 17 | #ifndef Py_LIMITED_API 18 | # define Py_CPYTHON_FILEUTILS_H 19 | # include "cpython/fileutils.h" 20 | # undef Py_CPYTHON_FILEUTILS_H 21 | #endif 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_FILEUTILS_H */ 27 | -------------------------------------------------------------------------------- /python/3.10/include/frameobject.h: -------------------------------------------------------------------------------- 1 | /* Frame object interface */ 2 | 3 | #ifndef Py_FRAMEOBJECT_H 4 | #define Py_FRAMEOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #include "pyframe.h" 10 | 11 | #ifndef Py_LIMITED_API 12 | # define Py_CPYTHON_FRAMEOBJECT_H 13 | # include "cpython/frameobject.h" 14 | # undef Py_CPYTHON_FRAMEOBJECT_H 15 | #endif 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif /* !Py_FRAMEOBJECT_H */ 21 | -------------------------------------------------------------------------------- /python/3.10/include/genericaliasobject.h: -------------------------------------------------------------------------------- 1 | // Implementation of PEP 585: support list[int] etc. 2 | #ifndef Py_GENERICALIASOBJECT_H 3 | #define Py_GENERICALIASOBJECT_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_FUNC(PyObject *) Py_GenericAlias(PyObject *, PyObject *); 9 | PyAPI_DATA(PyTypeObject) Py_GenericAliasType; 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif /* !Py_GENERICALIASOBJECT_H */ 15 | -------------------------------------------------------------------------------- /python/3.10/include/internal/pycore_abstract.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_ABSTRACT_H 2 | #define Py_INTERNAL_ABSTRACT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | // Fast inlined version of PyIndex_Check() 12 | static inline int 13 | _PyIndex_Check(PyObject *obj) 14 | { 15 | PyNumberMethods *tp_as_number = Py_TYPE(obj)->tp_as_number; 16 | return (tp_as_number != NULL && tp_as_number->nb_index != NULL); 17 | } 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif /* !Py_INTERNAL_ABSTRACT_H */ 23 | -------------------------------------------------------------------------------- /python/3.10/include/internal/pycore_accu.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_LIMITED_API 2 | #ifndef Py_INTERNAL_ACCU_H 3 | #define Py_INTERNAL_ACCU_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | /*** This is a private API for use by the interpreter and the stdlib. 9 | *** Its definition may be changed or removed at any moment. 10 | ***/ 11 | 12 | #ifndef Py_BUILD_CORE 13 | # error "this header requires Py_BUILD_CORE define" 14 | #endif 15 | 16 | /* 17 | * A two-level accumulator of unicode objects that avoids both the overhead 18 | * of keeping a huge number of small separate objects, and the quadratic 19 | * behaviour of using a naive repeated concatenation scheme. 20 | */ 21 | 22 | #undef small /* defined by some Windows headers */ 23 | 24 | typedef struct { 25 | PyObject *large; /* A list of previously accumulated large strings */ 26 | PyObject *small; /* Pending small strings */ 27 | } _PyAccu; 28 | 29 | PyAPI_FUNC(int) _PyAccu_Init(_PyAccu *acc); 30 | PyAPI_FUNC(int) _PyAccu_Accumulate(_PyAccu *acc, PyObject *unicode); 31 | PyAPI_FUNC(PyObject *) _PyAccu_FinishAsList(_PyAccu *acc); 32 | PyAPI_FUNC(PyObject *) _PyAccu_Finish(_PyAccu *acc); 33 | PyAPI_FUNC(void) _PyAccu_Destroy(_PyAccu *acc); 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | #endif /* !Py_INTERNAL_ACCU_H */ 39 | #endif /* !Py_LIMITED_API */ 40 | -------------------------------------------------------------------------------- /python/3.10/include/internal/pycore_call.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_CALL_H 2 | #define Py_INTERNAL_CALL_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | PyAPI_FUNC(PyObject *) _PyObject_Call_Prepend( 12 | PyThreadState *tstate, 13 | PyObject *callable, 14 | PyObject *obj, 15 | PyObject *args, 16 | PyObject *kwargs); 17 | 18 | PyAPI_FUNC(PyObject *) _PyObject_FastCallDictTstate( 19 | PyThreadState *tstate, 20 | PyObject *callable, 21 | PyObject *const *args, 22 | size_t nargsf, 23 | PyObject *kwargs); 24 | 25 | PyAPI_FUNC(PyObject *) _PyObject_Call( 26 | PyThreadState *tstate, 27 | PyObject *callable, 28 | PyObject *args, 29 | PyObject *kwargs); 30 | 31 | static inline PyObject * 32 | _PyObject_CallNoArgTstate(PyThreadState *tstate, PyObject *func) { 33 | return _PyObject_VectorcallTstate(tstate, func, NULL, 0, NULL); 34 | } 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | #endif /* !Py_INTERNAL_CALL_H */ 40 | -------------------------------------------------------------------------------- /python/3.10/include/internal/pycore_code.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_CODE_H 2 | #define Py_INTERNAL_CODE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | typedef struct { 8 | PyObject *ptr; /* Cached pointer (borrowed reference) */ 9 | uint64_t globals_ver; /* ma_version of global dict */ 10 | uint64_t builtins_ver; /* ma_version of builtin dict */ 11 | } _PyOpcache_LoadGlobal; 12 | 13 | typedef struct { 14 | PyTypeObject *type; 15 | Py_ssize_t hint; 16 | unsigned int tp_version_tag; 17 | } _PyOpCodeOpt_LoadAttr; 18 | 19 | struct _PyOpcache { 20 | union { 21 | _PyOpcache_LoadGlobal lg; 22 | _PyOpCodeOpt_LoadAttr la; 23 | } u; 24 | char optimized; 25 | }; 26 | 27 | /* Private API */ 28 | int _PyCode_InitOpcache(PyCodeObject *co); 29 | 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | #endif /* !Py_INTERNAL_CODE_H */ 35 | -------------------------------------------------------------------------------- /python/3.10/include/internal/pycore_compile.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_COMPILE_H 2 | #define Py_INTERNAL_COMPILE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | struct _arena; // Type defined in pycore_pyarena.h 12 | struct _mod; // Type defined in pycore_ast.h 13 | 14 | // Export the symbol for test_peg_generator (built as a library) 15 | PyAPI_FUNC(PyCodeObject*) _PyAST_Compile( 16 | struct _mod *mod, 17 | PyObject *filename, 18 | PyCompilerFlags *flags, 19 | int optimize, 20 | struct _arena *arena); 21 | extern PyFutureFeatures* _PyFuture_FromAST( 22 | struct _mod * mod, 23 | PyObject *filename 24 | ); 25 | 26 | extern PyObject* _Py_Mangle(PyObject *p, PyObject *name); 27 | 28 | typedef struct { 29 | int optimize; 30 | int ff_features; 31 | 32 | int recursion_depth; /* current recursion depth */ 33 | int recursion_limit; /* recursion limit */ 34 | } _PyASTOptimizeState; 35 | 36 | extern int _PyAST_Optimize( 37 | struct _mod *, 38 | struct _arena *arena, 39 | _PyASTOptimizeState *state); 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | #endif /* !Py_INTERNAL_COMPILE_H */ 45 | -------------------------------------------------------------------------------- /python/3.10/include/internal/pycore_context.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_CONTEXT_H 2 | #define Py_INTERNAL_CONTEXT_H 3 | 4 | #ifndef Py_BUILD_CORE 5 | # error "this header requires Py_BUILD_CORE define" 6 | #endif 7 | 8 | #include "pycore_hamt.h" /* PyHamtObject */ 9 | 10 | struct _pycontextobject { 11 | PyObject_HEAD 12 | PyContext *ctx_prev; 13 | PyHamtObject *ctx_vars; 14 | PyObject *ctx_weakreflist; 15 | int ctx_entered; 16 | }; 17 | 18 | 19 | struct _pycontextvarobject { 20 | PyObject_HEAD 21 | PyObject *var_name; 22 | PyObject *var_default; 23 | PyObject *var_cached; 24 | uint64_t var_cached_tsid; 25 | uint64_t var_cached_tsver; 26 | Py_hash_t var_hash; 27 | }; 28 | 29 | 30 | struct _pycontexttokenobject { 31 | PyObject_HEAD 32 | PyContext *tok_ctx; 33 | PyContextVar *tok_var; 34 | PyObject *tok_oldval; 35 | int tok_used; 36 | }; 37 | 38 | 39 | int _PyContext_Init(void); 40 | void _PyContext_Fini(PyInterpreterState *interp); 41 | 42 | #endif /* !Py_INTERNAL_CONTEXT_H */ 43 | -------------------------------------------------------------------------------- /python/3.10/include/internal/pycore_dtoa.h: -------------------------------------------------------------------------------- 1 | #ifndef PY_NO_SHORT_FLOAT_REPR 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifndef Py_BUILD_CORE 7 | # error "this header requires Py_BUILD_CORE define" 8 | #endif 9 | 10 | /* These functions are used by modules compiled as C extension like math: 11 | they must be exported. */ 12 | 13 | PyAPI_FUNC(double) _Py_dg_strtod(const char *str, char **ptr); 14 | PyAPI_FUNC(char *) _Py_dg_dtoa(double d, int mode, int ndigits, 15 | int *decpt, int *sign, char **rve); 16 | PyAPI_FUNC(void) _Py_dg_freedtoa(char *s); 17 | PyAPI_FUNC(double) _Py_dg_stdnan(int sign); 18 | PyAPI_FUNC(double) _Py_dg_infinity(int sign); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | #endif /* !PY_NO_SHORT_FLOAT_REPR */ 24 | -------------------------------------------------------------------------------- /python/3.10/include/internal/pycore_format.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_FORMAT_H 2 | #define Py_INTERNAL_FORMAT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | /* Format codes 12 | * F_LJUST '-' 13 | * F_SIGN '+' 14 | * F_BLANK ' ' 15 | * F_ALT '#' 16 | * F_ZERO '0' 17 | */ 18 | #define F_LJUST (1<<0) 19 | #define F_SIGN (1<<1) 20 | #define F_BLANK (1<<2) 21 | #define F_ALT (1<<3) 22 | #define F_ZERO (1<<4) 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | #endif /* !Py_INTERNAL_FORMAT_H */ 28 | -------------------------------------------------------------------------------- /python/3.10/include/internal/pycore_getopt.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_PYGETOPT_H 2 | #define Py_INTERNAL_PYGETOPT_H 3 | 4 | #ifndef Py_BUILD_CORE 5 | # error "this header requires Py_BUILD_CORE define" 6 | #endif 7 | 8 | extern int _PyOS_opterr; 9 | extern Py_ssize_t _PyOS_optind; 10 | extern const wchar_t *_PyOS_optarg; 11 | 12 | extern void _PyOS_ResetGetOpt(void); 13 | 14 | typedef struct { 15 | const wchar_t *name; 16 | int has_arg; 17 | int val; 18 | } _PyOS_LongOption; 19 | 20 | extern int _PyOS_GetOpt(Py_ssize_t argc, wchar_t * const *argv, int *longindex); 21 | 22 | #endif /* !Py_INTERNAL_PYGETOPT_H */ 23 | -------------------------------------------------------------------------------- /python/3.10/include/internal/pycore_import.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_LIMITED_API 2 | #ifndef Py_INTERNAL_IMPORT_H 3 | #define Py_INTERNAL_IMPORT_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #ifdef HAVE_FORK 9 | extern PyStatus _PyImport_ReInitLock(void); 10 | #endif 11 | extern PyObject* _PyImport_BootstrapImp(PyThreadState *tstate); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | #endif /* !Py_INTERNAL_IMPORT_H */ 17 | #endif /* !Py_LIMITED_API */ 18 | -------------------------------------------------------------------------------- /python/3.10/include/internal/pycore_list.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_LIST_H 2 | #define Py_INTERNAL_LIST_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | #include "listobject.h" // _PyList_CAST() 12 | 13 | 14 | #define _PyList_ITEMS(op) (_PyList_CAST(op)->ob_item) 15 | 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif /* !Py_INTERNAL_LIST_H */ 21 | -------------------------------------------------------------------------------- /python/3.10/include/internal/pycore_moduleobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_MODULEOBJECT_H 2 | #define Py_INTERNAL_MODULEOBJECT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | typedef struct { 12 | PyObject_HEAD 13 | PyObject *md_dict; 14 | struct PyModuleDef *md_def; 15 | void *md_state; 16 | PyObject *md_weaklist; 17 | // for logging purposes after md_dict is cleared 18 | PyObject *md_name; 19 | } PyModuleObject; 20 | 21 | static inline PyModuleDef* _PyModule_GetDef(PyObject *mod) { 22 | assert(PyModule_Check(mod)); 23 | return ((PyModuleObject *)mod)->md_def; 24 | } 25 | 26 | static inline void* _PyModule_GetState(PyObject* mod) { 27 | assert(PyModule_Check(mod)); 28 | return ((PyModuleObject *)mod)->md_state; 29 | } 30 | 31 | static inline PyObject* _PyModule_GetDict(PyObject *mod) { 32 | assert(PyModule_Check(mod)); 33 | PyObject *dict = ((PyModuleObject *)mod) -> md_dict; 34 | // _PyModule_GetDict(mod) must not be used after calling module_clear(mod) 35 | assert(dict != NULL); 36 | return dict; 37 | } 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | #endif /* !Py_INTERNAL_MODULEOBJECT_H */ 43 | -------------------------------------------------------------------------------- /python/3.10/include/internal/pycore_parser.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_PARSER_H 2 | #define Py_INTERNAL_PARSER_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | extern struct _mod* _PyParser_ASTFromString( 12 | const char *str, 13 | PyObject* filename, 14 | int mode, 15 | PyCompilerFlags *flags, 16 | PyArena *arena); 17 | extern struct _mod* _PyParser_ASTFromFile( 18 | FILE *fp, 19 | PyObject *filename_ob, 20 | const char *enc, 21 | int mode, 22 | const char *ps1, 23 | const char *ps2, 24 | PyCompilerFlags *flags, 25 | int *errcode, 26 | PyArena *arena); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | #endif /* !Py_INTERNAL_PARSER_H */ 32 | -------------------------------------------------------------------------------- /python/3.10/include/internal/pycore_pyhash.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_HASH_H 2 | #define Py_INTERNAL_HASH_H 3 | 4 | #ifndef Py_BUILD_CORE 5 | # error "this header requires Py_BUILD_CORE define" 6 | #endif 7 | 8 | uint64_t _Py_KeyedHash(uint64_t, const char *, Py_ssize_t); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /python/3.10/include/internal/pycore_structseq.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_STRUCTSEQ_H 2 | #define Py_INTERNAL_STRUCTSEQ_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | 12 | PyAPI_FUNC(int) _PyStructSequence_InitType( 13 | PyTypeObject *type, 14 | PyStructSequence_Desc *desc, 15 | unsigned long tp_flags); 16 | 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | #endif /* !Py_INTERNAL_STRUCTSEQ_H */ 22 | -------------------------------------------------------------------------------- /python/3.10/include/internal/pycore_sysmodule.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_SYSMODULE_H 2 | #define Py_INTERNAL_SYSMODULE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | PyAPI_FUNC(int) _PySys_Audit( 12 | PyThreadState *tstate, 13 | const char *event, 14 | const char *argFormat, 15 | ...); 16 | 17 | /* We want minimal exposure of this function, so use extern rather than 18 | PyAPI_FUNC() to not export the symbol. */ 19 | extern void _PySys_ClearAuditHooks(PyThreadState *tstate); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | #endif /* !Py_INTERNAL_SYSMODULE_H */ 25 | -------------------------------------------------------------------------------- /python/3.10/include/internal/pycore_tuple.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_TUPLE_H 2 | #define Py_INTERNAL_TUPLE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | #include "tupleobject.h" /* _PyTuple_CAST() */ 12 | 13 | #define _PyTuple_ITEMS(op) (_PyTuple_CAST(op)->ob_item) 14 | 15 | PyAPI_FUNC(PyObject *) _PyTuple_FromArray(PyObject *const *, Py_ssize_t); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif /* !Py_INTERNAL_TUPLE_H */ 21 | -------------------------------------------------------------------------------- /python/3.10/include/internal/pycore_ucnhash.h: -------------------------------------------------------------------------------- 1 | /* Unicode name database interface */ 2 | #ifndef Py_INTERNAL_UCNHASH_H 3 | #define Py_INTERNAL_UCNHASH_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #ifndef Py_BUILD_CORE 9 | # error "this header requires Py_BUILD_CORE define" 10 | #endif 11 | 12 | /* revised ucnhash CAPI interface (exported through a "wrapper") */ 13 | 14 | #define PyUnicodeData_CAPSULE_NAME "unicodedata._ucnhash_CAPI" 15 | 16 | typedef struct { 17 | 18 | /* Get name for a given character code. 19 | Returns non-zero if success, zero if not. 20 | Does not set Python exceptions. */ 21 | int (*getname)(Py_UCS4 code, char* buffer, int buflen, 22 | int with_alias_and_seq); 23 | 24 | /* Get character code for a given name. 25 | Same error handling as for getname(). */ 26 | int (*getcode)(const char* name, int namelen, Py_UCS4* code, 27 | int with_named_seq); 28 | 29 | } _PyUnicode_Name_CAPI; 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | #endif /* !Py_INTERNAL_UCNHASH_H */ 35 | -------------------------------------------------------------------------------- /python/3.10/include/internal/pycore_unionobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_UNIONOBJECT_H 2 | #define Py_INTERNAL_UNIONOBJECT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | extern PyTypeObject _PyUnion_Type; 12 | #define _PyUnion_Check(op) Py_IS_TYPE(op, &_PyUnion_Type) 13 | extern PyObject *_Py_union_type_or(PyObject *, PyObject *); 14 | 15 | #define _PyGenericAlias_Check(op) PyObject_TypeCheck(op, &Py_GenericAliasType) 16 | extern PyObject *_Py_subs_parameters(PyObject *, PyObject *, PyObject *, PyObject *); 17 | extern PyObject *_Py_make_parameters(PyObject *); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif /* !Py_INTERNAL_UNIONOBJECT_H */ 23 | -------------------------------------------------------------------------------- /python/3.10/include/internal/pycore_warnings.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_WARNINGS_H 2 | #define Py_INTERNAL_WARNINGS_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | struct _warnings_runtime_state { 12 | /* Both 'filters' and 'onceregistry' can be set in warnings.py; 13 | get_warnings_attr() will reset these variables accordingly. */ 14 | PyObject *filters; /* List */ 15 | PyObject *once_registry; /* Dict */ 16 | PyObject *default_action; /* String */ 17 | long filters_version; 18 | }; 19 | 20 | extern int _PyWarnings_InitState(PyInterpreterState *interp); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | #endif /* !Py_INTERNAL_WARNINGS_H */ 26 | -------------------------------------------------------------------------------- /python/3.10/include/interpreteridobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERPRETERIDOBJECT_H 2 | #define Py_INTERPRETERIDOBJECT_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #ifndef Py_LIMITED_API 9 | # define Py_CPYTHON_INTERPRETERIDOBJECT_H 10 | # include "cpython/interpreteridobject.h" 11 | # undef Py_CPYTHON_INTERPRETERIDOBJECT_H 12 | #endif 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | #endif /* !Py_INTERPRETERIDOBJECT_H */ 18 | -------------------------------------------------------------------------------- /python/3.10/include/intrcheck.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTRCHECK_H 2 | #define Py_INTRCHECK_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | PyAPI_FUNC(int) PyOS_InterruptOccurred(void); 8 | #ifdef HAVE_FORK 9 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000 10 | PyAPI_FUNC(void) PyOS_BeforeFork(void); 11 | PyAPI_FUNC(void) PyOS_AfterFork_Parent(void); 12 | PyAPI_FUNC(void) PyOS_AfterFork_Child(void); 13 | #endif 14 | #endif 15 | /* Deprecated, please use PyOS_AfterFork_Child() instead */ 16 | Py_DEPRECATED(3.7) PyAPI_FUNC(void) PyOS_AfterFork(void); 17 | 18 | #ifndef Py_LIMITED_API 19 | PyAPI_FUNC(int) _PyOS_IsMainThread(void); 20 | 21 | #ifdef MS_WINDOWS 22 | /* windows.h is not included by Python.h so use void* instead of HANDLE */ 23 | PyAPI_FUNC(void*) _PyOS_SigintEvent(void); 24 | #endif 25 | #endif /* !Py_LIMITED_API */ 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif /* !Py_INTRCHECK_H */ 31 | -------------------------------------------------------------------------------- /python/3.10/include/iterobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_ITEROBJECT_H 2 | #define Py_ITEROBJECT_H 3 | /* Iterators (the basic kind, over a sequence) */ 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_DATA(PyTypeObject) PySeqIter_Type; 9 | PyAPI_DATA(PyTypeObject) PyCallIter_Type; 10 | #ifdef Py_BUILD_CORE 11 | extern PyTypeObject _PyAnextAwaitable_Type; 12 | #endif 13 | 14 | #define PySeqIter_Check(op) Py_IS_TYPE(op, &PySeqIter_Type) 15 | 16 | PyAPI_FUNC(PyObject *) PySeqIter_New(PyObject *); 17 | 18 | 19 | #define PyCallIter_Check(op) Py_IS_TYPE(op, &PyCallIter_Type) 20 | 21 | PyAPI_FUNC(PyObject *) PyCallIter_New(PyObject *, PyObject *); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_ITEROBJECT_H */ 27 | 28 | -------------------------------------------------------------------------------- /python/3.10/include/marshal.h: -------------------------------------------------------------------------------- 1 | 2 | /* Interface for marshal.c */ 3 | 4 | #ifndef Py_MARSHAL_H 5 | #define Py_MARSHAL_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | #define Py_MARSHAL_VERSION 4 11 | 12 | PyAPI_FUNC(void) PyMarshal_WriteLongToFile(long, FILE *, int); 13 | PyAPI_FUNC(void) PyMarshal_WriteObjectToFile(PyObject *, FILE *, int); 14 | PyAPI_FUNC(PyObject *) PyMarshal_WriteObjectToString(PyObject *, int); 15 | 16 | #ifndef Py_LIMITED_API 17 | PyAPI_FUNC(long) PyMarshal_ReadLongFromFile(FILE *); 18 | PyAPI_FUNC(int) PyMarshal_ReadShortFromFile(FILE *); 19 | PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromFile(FILE *); 20 | PyAPI_FUNC(PyObject *) PyMarshal_ReadLastObjectFromFile(FILE *); 21 | #endif 22 | PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromString(const char *, 23 | Py_ssize_t); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | #endif /* !Py_MARSHAL_H */ 29 | -------------------------------------------------------------------------------- /python/3.10/include/namespaceobject.h: -------------------------------------------------------------------------------- 1 | 2 | /* simple namespace object interface */ 3 | 4 | #ifndef NAMESPACEOBJECT_H 5 | #define NAMESPACEOBJECT_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | #ifndef Py_LIMITED_API 11 | PyAPI_DATA(PyTypeObject) _PyNamespace_Type; 12 | 13 | PyAPI_FUNC(PyObject *) _PyNamespace_New(PyObject *kwds); 14 | #endif /* !Py_LIMITED_API */ 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | #endif /* !NAMESPACEOBJECT_H */ 20 | -------------------------------------------------------------------------------- /python/3.10/include/osdefs.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_OSDEFS_H 2 | #define Py_OSDEFS_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | 8 | /* Operating system dependencies */ 9 | 10 | #ifdef MS_WINDOWS 11 | #define SEP L'\\' 12 | #define ALTSEP L'/' 13 | #define MAXPATHLEN 256 14 | #define DELIM L';' 15 | #endif 16 | 17 | #ifdef __VXWORKS__ 18 | #define DELIM L';' 19 | #endif 20 | 21 | /* Filename separator */ 22 | #ifndef SEP 23 | #define SEP L'/' 24 | #endif 25 | 26 | /* Max pathname length */ 27 | #ifdef __hpux 28 | #include 29 | #include 30 | #ifndef PATH_MAX 31 | #define PATH_MAX MAXPATHLEN 32 | #endif 33 | #endif 34 | 35 | #ifndef MAXPATHLEN 36 | #if defined(PATH_MAX) && PATH_MAX > 1024 37 | #define MAXPATHLEN PATH_MAX 38 | #else 39 | #define MAXPATHLEN 1024 40 | #endif 41 | #endif 42 | 43 | /* Search path entry delimiter */ 44 | #ifndef DELIM 45 | #define DELIM L':' 46 | #endif 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | #endif /* !Py_OSDEFS_H */ 52 | -------------------------------------------------------------------------------- /python/3.10/include/osmodule.h: -------------------------------------------------------------------------------- 1 | 2 | /* os module interface */ 3 | 4 | #ifndef Py_OSMODULE_H 5 | #define Py_OSMODULE_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000 11 | PyAPI_FUNC(PyObject *) PyOS_FSPath(PyObject *path); 12 | #endif 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | #endif /* !Py_OSMODULE_H */ 18 | -------------------------------------------------------------------------------- /python/3.10/include/pyframe.h: -------------------------------------------------------------------------------- 1 | /* Limited C API of PyFrame API 2 | * 3 | * Include "frameobject.h" to get the PyFrameObject structure. 4 | */ 5 | 6 | #ifndef Py_PYFRAME_H 7 | #define Py_PYFRAME_H 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | typedef struct _frame PyFrameObject; 13 | 14 | /* Return the line of code the frame is currently executing. */ 15 | PyAPI_FUNC(int) PyFrame_GetLineNumber(PyFrameObject *); 16 | 17 | PyAPI_FUNC(PyCodeObject *) PyFrame_GetCode(PyFrameObject *frame); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif /* !Py_PYFRAME_H */ 23 | -------------------------------------------------------------------------------- /python/3.10/include/pystrcmp.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_STRCMP_H 2 | #define Py_STRCMP_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_FUNC(int) PyOS_mystrnicmp(const char *, const char *, Py_ssize_t); 9 | PyAPI_FUNC(int) PyOS_mystricmp(const char *, const char *); 10 | 11 | #ifdef MS_WINDOWS 12 | #define PyOS_strnicmp strnicmp 13 | #define PyOS_stricmp stricmp 14 | #else 15 | #define PyOS_strnicmp PyOS_mystrnicmp 16 | #define PyOS_stricmp PyOS_mystricmp 17 | #endif 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif /* !Py_STRCMP_H */ 24 | -------------------------------------------------------------------------------- /python/3.10/include/pystrhex.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_STRHEX_H 2 | #define Py_STRHEX_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #ifndef Py_LIMITED_API 9 | /* Returns a str() containing the hex representation of argbuf. */ 10 | PyAPI_FUNC(PyObject*) _Py_strhex(const char* argbuf, const Py_ssize_t arglen); 11 | /* Returns a bytes() containing the ASCII hex representation of argbuf. */ 12 | PyAPI_FUNC(PyObject*) _Py_strhex_bytes(const char* argbuf, const Py_ssize_t arglen); 13 | /* These variants include support for a separator between every N bytes: */ 14 | PyAPI_FUNC(PyObject*) _Py_strhex_with_sep(const char* argbuf, const Py_ssize_t arglen, const PyObject* sep, const int bytes_per_group); 15 | PyAPI_FUNC(PyObject*) _Py_strhex_bytes_with_sep(const char* argbuf, const Py_ssize_t arglen, const PyObject* sep, const int bytes_per_group); 16 | #endif /* !Py_LIMITED_API */ 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif /* !Py_STRHEX_H */ 23 | -------------------------------------------------------------------------------- /python/3.10/include/pythonrun.h: -------------------------------------------------------------------------------- 1 | 2 | /* Interfaces to parse and execute pieces of python code */ 3 | 4 | #ifndef Py_PYTHONRUN_H 5 | #define Py_PYTHONRUN_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | PyAPI_FUNC(PyObject *) Py_CompileString(const char *, const char *, int); 11 | 12 | PyAPI_FUNC(void) PyErr_Print(void); 13 | PyAPI_FUNC(void) PyErr_PrintEx(int); 14 | PyAPI_FUNC(void) PyErr_Display(PyObject *, PyObject *, PyObject *); 15 | 16 | 17 | /* Stuff with no proper home (yet) */ 18 | PyAPI_DATA(int) (*PyOS_InputHook)(void); 19 | 20 | /* Stack size, in "pointers" (so we get extra safety margins 21 | on 64-bit platforms). On a 32-bit platform, this translates 22 | to an 8k margin. */ 23 | #define PYOS_STACK_MARGIN 2048 24 | 25 | #if defined(WIN32) && !defined(MS_WIN64) && !defined(_M_ARM) && defined(_MSC_VER) && _MSC_VER >= 1300 26 | /* Enable stack checking under Microsoft C */ 27 | #define USE_STACKCHECK 28 | #endif 29 | 30 | #ifdef USE_STACKCHECK 31 | /* Check that we aren't overflowing our stack */ 32 | PyAPI_FUNC(int) PyOS_CheckStack(void); 33 | #endif 34 | 35 | #ifndef Py_LIMITED_API 36 | # define Py_CPYTHON_PYTHONRUN_H 37 | # include "cpython/pythonrun.h" 38 | # undef Py_CPYTHON_PYTHONRUN_H 39 | #endif 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | #endif /* !Py_PYTHONRUN_H */ 45 | -------------------------------------------------------------------------------- /python/3.10/include/rangeobject.h: -------------------------------------------------------------------------------- 1 | 2 | /* Range object interface */ 3 | 4 | #ifndef Py_RANGEOBJECT_H 5 | #define Py_RANGEOBJECT_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | /* 11 | A range object represents an integer range. This is an immutable object; 12 | a range cannot change its value after creation. 13 | 14 | Range objects behave like the corresponding tuple objects except that 15 | they are represented by a start, stop, and step datamembers. 16 | */ 17 | 18 | PyAPI_DATA(PyTypeObject) PyRange_Type; 19 | PyAPI_DATA(PyTypeObject) PyRangeIter_Type; 20 | PyAPI_DATA(PyTypeObject) PyLongRangeIter_Type; 21 | 22 | #define PyRange_Check(op) Py_IS_TYPE(op, &PyRange_Type) 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | #endif /* !Py_RANGEOBJECT_H */ 28 | -------------------------------------------------------------------------------- /python/3.10/include/traceback.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_TRACEBACK_H 2 | #define Py_TRACEBACK_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | /* Traceback interface */ 8 | 9 | PyAPI_FUNC(int) PyTraceBack_Here(PyFrameObject *); 10 | PyAPI_FUNC(int) PyTraceBack_Print(PyObject *, PyObject *); 11 | 12 | /* Reveal traceback type so we can typecheck traceback objects */ 13 | PyAPI_DATA(PyTypeObject) PyTraceBack_Type; 14 | #define PyTraceBack_Check(v) Py_IS_TYPE(v, &PyTraceBack_Type) 15 | 16 | 17 | #ifndef Py_LIMITED_API 18 | # define Py_CPYTHON_TRACEBACK_H 19 | # include "cpython/traceback.h" 20 | # undef Py_CPYTHON_TRACEBACK_H 21 | #endif 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_TRACEBACK_H */ 27 | -------------------------------------------------------------------------------- /python/3.10/include/tracemalloc.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_TRACEMALLOC_H 2 | #define Py_TRACEMALLOC_H 3 | 4 | #ifndef Py_LIMITED_API 5 | /* Track an allocated memory block in the tracemalloc module. 6 | Return 0 on success, return -1 on error (failed to allocate memory to store 7 | the trace). 8 | 9 | Return -2 if tracemalloc is disabled. 10 | 11 | If memory block is already tracked, update the existing trace. */ 12 | PyAPI_FUNC(int) PyTraceMalloc_Track( 13 | unsigned int domain, 14 | uintptr_t ptr, 15 | size_t size); 16 | 17 | /* Untrack an allocated memory block in the tracemalloc module. 18 | Do nothing if the block was not tracked. 19 | 20 | Return -2 if tracemalloc is disabled, otherwise return 0. */ 21 | PyAPI_FUNC(int) PyTraceMalloc_Untrack( 22 | unsigned int domain, 23 | uintptr_t ptr); 24 | 25 | /* Get the traceback where a memory block was allocated. 26 | 27 | Return a tuple of (filename: str, lineno: int) tuples. 28 | 29 | Return None if the tracemalloc module is disabled or if the memory block 30 | is not tracked by tracemalloc. 31 | 32 | Raise an exception and return NULL on error. */ 33 | PyAPI_FUNC(PyObject*) _PyTraceMalloc_GetTraceback( 34 | unsigned int domain, 35 | uintptr_t ptr); 36 | #endif 37 | 38 | #endif /* !Py_TRACEMALLOC_H */ 39 | -------------------------------------------------------------------------------- /python/3.10/lib/python3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flexsim/FlexSimPy/79b0aed7b3e677ceb41754df2dba8cdb4a001a78/python/3.10/lib/python3.lib -------------------------------------------------------------------------------- /python/3.10/lib/python310.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flexsim/FlexSimPy/79b0aed7b3e677ceb41754df2dba8cdb4a001a78/python/3.10/lib/python310.lib -------------------------------------------------------------------------------- /python/3.11/include/bltinmodule.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_BLTINMODULE_H 2 | #define Py_BLTINMODULE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | PyAPI_DATA(PyTypeObject) PyFilter_Type; 8 | PyAPI_DATA(PyTypeObject) PyMap_Type; 9 | PyAPI_DATA(PyTypeObject) PyZip_Type; 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif /* !Py_BLTINMODULE_H */ 15 | -------------------------------------------------------------------------------- /python/3.11/include/boolobject.h: -------------------------------------------------------------------------------- 1 | /* Boolean object interface */ 2 | 3 | #ifndef Py_BOOLOBJECT_H 4 | #define Py_BOOLOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | 10 | PyAPI_DATA(PyTypeObject) PyBool_Type; 11 | 12 | #define PyBool_Check(x) Py_IS_TYPE(x, &PyBool_Type) 13 | 14 | /* Py_False and Py_True are the only two bools in existence. 15 | Don't forget to apply Py_INCREF() when returning either!!! */ 16 | 17 | /* Don't use these directly */ 18 | PyAPI_DATA(PyLongObject) _Py_FalseStruct; 19 | PyAPI_DATA(PyLongObject) _Py_TrueStruct; 20 | 21 | /* Use these macros */ 22 | #define Py_False ((PyObject *) &_Py_FalseStruct) 23 | #define Py_True ((PyObject *) &_Py_TrueStruct) 24 | 25 | // Test if an object is the True singleton, the same as "x is True" in Python. 26 | PyAPI_FUNC(int) Py_IsTrue(PyObject *x); 27 | #define Py_IsTrue(x) Py_Is((x), Py_True) 28 | 29 | // Test if an object is the False singleton, the same as "x is False" in Python. 30 | PyAPI_FUNC(int) Py_IsFalse(PyObject *x); 31 | #define Py_IsFalse(x) Py_Is((x), Py_False) 32 | 33 | /* Macros for returning Py_True or Py_False, respectively */ 34 | #define Py_RETURN_TRUE return Py_NewRef(Py_True) 35 | #define Py_RETURN_FALSE return Py_NewRef(Py_False) 36 | 37 | /* Function to return a bool from a C long */ 38 | PyAPI_FUNC(PyObject *) PyBool_FromLong(long); 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | #endif /* !Py_BOOLOBJECT_H */ 44 | -------------------------------------------------------------------------------- /python/3.11/include/compile.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_COMPILE_H 2 | #define Py_COMPILE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | /* These definitions must match corresponding definitions in graminit.h. */ 8 | #define Py_single_input 256 9 | #define Py_file_input 257 10 | #define Py_eval_input 258 11 | #define Py_func_type_input 345 12 | 13 | /* This doesn't need to match anything */ 14 | #define Py_fstring_input 800 15 | 16 | #ifndef Py_LIMITED_API 17 | # define Py_CPYTHON_COMPILE_H 18 | # include "cpython/compile.h" 19 | # undef Py_CPYTHON_COMPILE_H 20 | #endif 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | #endif /* !Py_COMPILE_H */ 26 | -------------------------------------------------------------------------------- /python/3.11/include/complexobject.h: -------------------------------------------------------------------------------- 1 | /* Complex number structure */ 2 | 3 | #ifndef Py_COMPLEXOBJECT_H 4 | #define Py_COMPLEXOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | /* Complex object interface */ 10 | 11 | PyAPI_DATA(PyTypeObject) PyComplex_Type; 12 | 13 | #define PyComplex_Check(op) PyObject_TypeCheck(op, &PyComplex_Type) 14 | #define PyComplex_CheckExact(op) Py_IS_TYPE(op, &PyComplex_Type) 15 | 16 | PyAPI_FUNC(PyObject *) PyComplex_FromDoubles(double real, double imag); 17 | 18 | PyAPI_FUNC(double) PyComplex_RealAsDouble(PyObject *op); 19 | PyAPI_FUNC(double) PyComplex_ImagAsDouble(PyObject *op); 20 | 21 | #ifndef Py_LIMITED_API 22 | # define Py_CPYTHON_COMPLEXOBJECT_H 23 | # include "cpython/complexobject.h" 24 | # undef Py_CPYTHON_COMPLEXOBJECT_H 25 | #endif 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif /* !Py_COMPLEXOBJECT_H */ 31 | -------------------------------------------------------------------------------- /python/3.11/include/cpython/cellobject.h: -------------------------------------------------------------------------------- 1 | /* Cell object interface */ 2 | 3 | #ifndef Py_LIMITED_API 4 | #ifndef Py_CELLOBJECT_H 5 | #define Py_CELLOBJECT_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | typedef struct { 11 | PyObject_HEAD 12 | /* Content of the cell or NULL when empty */ 13 | PyObject *ob_ref; 14 | } PyCellObject; 15 | 16 | PyAPI_DATA(PyTypeObject) PyCell_Type; 17 | 18 | #define PyCell_Check(op) Py_IS_TYPE(op, &PyCell_Type) 19 | 20 | PyAPI_FUNC(PyObject *) PyCell_New(PyObject *); 21 | PyAPI_FUNC(PyObject *) PyCell_Get(PyObject *); 22 | PyAPI_FUNC(int) PyCell_Set(PyObject *, PyObject *); 23 | 24 | #define PyCell_GET(op) (((PyCellObject *)(op))->ob_ref) 25 | #define PyCell_SET(op, v) _Py_RVALUE(((PyCellObject *)(op))->ob_ref = (v)) 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif /* !Py_TUPLEOBJECT_H */ 31 | #endif /* Py_LIMITED_API */ 32 | -------------------------------------------------------------------------------- /python/3.11/include/cpython/ceval.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_CEVAL_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | PyAPI_FUNC(void) PyEval_SetProfile(Py_tracefunc, PyObject *); 6 | PyAPI_DATA(int) _PyEval_SetProfile(PyThreadState *tstate, Py_tracefunc func, PyObject *arg); 7 | PyAPI_FUNC(void) PyEval_SetTrace(Py_tracefunc, PyObject *); 8 | PyAPI_FUNC(int) _PyEval_SetTrace(PyThreadState *tstate, Py_tracefunc func, PyObject *arg); 9 | 10 | /* Helper to look up a builtin object */ 11 | PyAPI_FUNC(PyObject *) _PyEval_GetBuiltin(PyObject *); 12 | PyAPI_FUNC(PyObject *) _PyEval_GetBuiltinId(_Py_Identifier *); 13 | /* Look at the current frame's (if any) code's co_flags, and turn on 14 | the corresponding compiler flags in cf->cf_flags. Return 1 if any 15 | flag was set, else return 0. */ 16 | PyAPI_FUNC(int) PyEval_MergeCompilerFlags(PyCompilerFlags *cf); 17 | 18 | PyAPI_FUNC(PyObject *) _PyEval_EvalFrameDefault(PyThreadState *tstate, struct _PyInterpreterFrame *f, int exc); 19 | 20 | PyAPI_FUNC(void) _PyEval_SetSwitchInterval(unsigned long microseconds); 21 | PyAPI_FUNC(unsigned long) _PyEval_GetSwitchInterval(void); 22 | 23 | PyAPI_FUNC(Py_ssize_t) _PyEval_RequestCodeExtraIndex(freefunc); 24 | 25 | PyAPI_FUNC(int) _PyEval_SliceIndex(PyObject *, Py_ssize_t *); 26 | PyAPI_FUNC(int) _PyEval_SliceIndexNotNone(PyObject *, Py_ssize_t *); 27 | -------------------------------------------------------------------------------- /python/3.11/include/cpython/fileobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_FILEOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | PyAPI_FUNC(char *) Py_UniversalNewlineFgets(char *, int, FILE*, PyObject *); 6 | 7 | /* The std printer acts as a preliminary sys.stderr until the new io 8 | infrastructure is in place. */ 9 | PyAPI_FUNC(PyObject *) PyFile_NewStdPrinter(int); 10 | PyAPI_DATA(PyTypeObject) PyStdPrinter_Type; 11 | 12 | typedef PyObject * (*Py_OpenCodeHookFunction)(PyObject *, void *); 13 | 14 | PyAPI_FUNC(PyObject *) PyFile_OpenCode(const char *utf8path); 15 | PyAPI_FUNC(PyObject *) PyFile_OpenCodeObject(PyObject *path); 16 | PyAPI_FUNC(int) PyFile_SetOpenCodeHook(Py_OpenCodeHookFunction hook, void *userData); 17 | 18 | PyAPI_FUNC(int) _PyLong_FileDescriptor_Converter(PyObject *, void *); 19 | -------------------------------------------------------------------------------- /python/3.11/include/cpython/fileutils.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_FILEUTILS_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | // Used by _testcapi which must not use the internal C API 6 | PyAPI_FUNC(FILE*) _Py_fopen_obj( 7 | PyObject *path, 8 | const char *mode); 9 | -------------------------------------------------------------------------------- /python/3.11/include/cpython/floatobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_FLOATOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | typedef struct { 6 | PyObject_HEAD 7 | double ob_fval; 8 | } PyFloatObject; 9 | 10 | // Macro version of PyFloat_AsDouble() trading safety for speed. 11 | // It doesn't check if op is a double object. 12 | #define PyFloat_AS_DOUBLE(op) (((PyFloatObject *)(op))->ob_fval) 13 | 14 | 15 | PyAPI_FUNC(int) PyFloat_Pack2(double x, char *p, int le); 16 | PyAPI_FUNC(int) PyFloat_Pack4(double x, char *p, int le); 17 | PyAPI_FUNC(int) PyFloat_Pack8(double x, char *p, int le); 18 | 19 | PyAPI_FUNC(double) PyFloat_Unpack2(const char *p, int le); 20 | PyAPI_FUNC(double) PyFloat_Unpack4(const char *p, int le); 21 | PyAPI_FUNC(double) PyFloat_Unpack8(const char *p, int le); 22 | -------------------------------------------------------------------------------- /python/3.11/include/cpython/frameobject.h: -------------------------------------------------------------------------------- 1 | /* Frame object interface */ 2 | 3 | #ifndef Py_CPYTHON_FRAMEOBJECT_H 4 | # error "this header file must not be included directly" 5 | #endif 6 | 7 | /* Standard object interface */ 8 | 9 | PyAPI_FUNC(PyFrameObject *) PyFrame_New(PyThreadState *, PyCodeObject *, 10 | PyObject *, PyObject *); 11 | 12 | /* The rest of the interface is specific for frame objects */ 13 | 14 | /* Conversions between "fast locals" and locals in dictionary */ 15 | 16 | PyAPI_FUNC(void) PyFrame_LocalsToFast(PyFrameObject *, int); 17 | 18 | /* -- Caveat emptor -- 19 | * The concept of entry frames is an implementation detail of the CPython 20 | * interpreter. This API is considered unstable and is provided for the 21 | * convenience of debuggers, profilers and state-inspecting tools. Notice that 22 | * this API can be changed in future minor versions if the underlying frame 23 | * mechanism change or the concept of an 'entry frame' or its semantics becomes 24 | * obsolete or outdated. */ 25 | 26 | PyAPI_FUNC(int) _PyFrame_IsEntryFrame(PyFrameObject *frame); 27 | 28 | PyAPI_FUNC(int) PyFrame_FastToLocalsWithError(PyFrameObject *f); 29 | PyAPI_FUNC(void) PyFrame_FastToLocals(PyFrameObject *); 30 | -------------------------------------------------------------------------------- /python/3.11/include/cpython/picklebufobject.h: -------------------------------------------------------------------------------- 1 | /* PickleBuffer object. This is built-in for ease of use from third-party 2 | * C extensions. 3 | */ 4 | 5 | #ifndef Py_PICKLEBUFOBJECT_H 6 | #define Py_PICKLEBUFOBJECT_H 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #ifndef Py_LIMITED_API 12 | 13 | PyAPI_DATA(PyTypeObject) PyPickleBuffer_Type; 14 | 15 | #define PyPickleBuffer_Check(op) Py_IS_TYPE(op, &PyPickleBuffer_Type) 16 | 17 | /* Create a PickleBuffer redirecting to the given buffer-enabled object */ 18 | PyAPI_FUNC(PyObject *) PyPickleBuffer_FromObject(PyObject *); 19 | /* Get the PickleBuffer's underlying view to the original object 20 | * (NULL if released) 21 | */ 22 | PyAPI_FUNC(const Py_buffer *) PyPickleBuffer_GetBuffer(PyObject *); 23 | /* Release the PickleBuffer. Returns 0 on success, -1 on error. */ 24 | PyAPI_FUNC(int) PyPickleBuffer_Release(PyObject *); 25 | 26 | #endif /* !Py_LIMITED_API */ 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | #endif /* !Py_PICKLEBUFOBJECT_H */ 32 | -------------------------------------------------------------------------------- /python/3.11/include/cpython/pydebug.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_LIMITED_API 2 | #ifndef Py_PYDEBUG_H 3 | #define Py_PYDEBUG_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_DATA(int) Py_DebugFlag; 9 | PyAPI_DATA(int) Py_VerboseFlag; 10 | PyAPI_DATA(int) Py_QuietFlag; 11 | PyAPI_DATA(int) Py_InteractiveFlag; 12 | PyAPI_DATA(int) Py_InspectFlag; 13 | PyAPI_DATA(int) Py_OptimizeFlag; 14 | PyAPI_DATA(int) Py_NoSiteFlag; 15 | PyAPI_DATA(int) Py_BytesWarningFlag; 16 | PyAPI_DATA(int) Py_FrozenFlag; 17 | PyAPI_DATA(int) Py_IgnoreEnvironmentFlag; 18 | PyAPI_DATA(int) Py_DontWriteBytecodeFlag; 19 | PyAPI_DATA(int) Py_NoUserSiteDirectory; 20 | PyAPI_DATA(int) Py_UnbufferedStdioFlag; 21 | PyAPI_DATA(int) Py_HashRandomizationFlag; 22 | PyAPI_DATA(int) Py_IsolatedFlag; 23 | 24 | #ifdef MS_WINDOWS 25 | PyAPI_DATA(int) Py_LegacyWindowsFSEncodingFlag; 26 | PyAPI_DATA(int) Py_LegacyWindowsStdioFlag; 27 | #endif 28 | 29 | /* this is a wrapper around getenv() that pays attention to 30 | Py_IgnoreEnvironmentFlag. It should be used for getting variables like 31 | PYTHONPATH and PYTHONHOME from the environment */ 32 | PyAPI_DATA(char*) Py_GETENV(const char *name); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | #endif /* !Py_PYDEBUG_H */ 38 | #endif /* Py_LIMITED_API */ 39 | -------------------------------------------------------------------------------- /python/3.11/include/cpython/pyfpe.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_PYFPE_H 2 | #define Py_PYFPE_H 3 | /* Header excluded from the stable API */ 4 | #ifndef Py_LIMITED_API 5 | 6 | /* These macros used to do something when Python was built with --with-fpectl, 7 | * but support for that was dropped in 3.7. We continue to define them though, 8 | * to avoid breaking API users. 9 | */ 10 | 11 | #define PyFPE_START_PROTECT(err_string, leave_stmt) 12 | #define PyFPE_END_PROTECT(v) 13 | 14 | #endif /* !defined(Py_LIMITED_API) */ 15 | #endif /* !Py_PYFPE_H */ 16 | -------------------------------------------------------------------------------- /python/3.11/include/cpython/pyframe.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_PYFRAME_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | PyAPI_DATA(PyTypeObject) PyFrame_Type; 6 | 7 | #define PyFrame_Check(op) Py_IS_TYPE((op), &PyFrame_Type) 8 | 9 | PyAPI_FUNC(PyFrameObject *) PyFrame_GetBack(PyFrameObject *frame); 10 | PyAPI_FUNC(PyObject *) PyFrame_GetLocals(PyFrameObject *frame); 11 | 12 | PyAPI_FUNC(PyObject *) PyFrame_GetGlobals(PyFrameObject *frame); 13 | PyAPI_FUNC(PyObject *) PyFrame_GetBuiltins(PyFrameObject *frame); 14 | 15 | PyAPI_FUNC(PyObject *) PyFrame_GetGenerator(PyFrameObject *frame); 16 | PyAPI_FUNC(int) PyFrame_GetLasti(PyFrameObject *frame); 17 | 18 | -------------------------------------------------------------------------------- /python/3.11/include/cpython/sysmodule.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_SYSMODULE_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | PyAPI_FUNC(PyObject *) _PySys_GetAttr(PyThreadState *tstate, 6 | PyObject *name); 7 | 8 | PyAPI_FUNC(size_t) _PySys_GetSizeOf(PyObject *); 9 | 10 | typedef int(*Py_AuditHookFunction)(const char *, PyObject *, void *); 11 | 12 | PyAPI_FUNC(int) PySys_Audit( 13 | const char *event, 14 | const char *argFormat, 15 | ...); 16 | PyAPI_FUNC(int) PySys_AddAuditHook(Py_AuditHookFunction, void*); 17 | -------------------------------------------------------------------------------- /python/3.11/include/cpython/traceback.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_TRACEBACK_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | typedef struct _traceback PyTracebackObject; 6 | 7 | struct _traceback { 8 | PyObject_HEAD 9 | PyTracebackObject *tb_next; 10 | PyFrameObject *tb_frame; 11 | int tb_lasti; 12 | int tb_lineno; 13 | }; 14 | 15 | PyAPI_FUNC(int) _Py_DisplaySourceLine(PyObject *, PyObject *, int, int, int *, PyObject **); 16 | PyAPI_FUNC(void) _PyTraceback_Add(const char *, const char *, int); 17 | -------------------------------------------------------------------------------- /python/3.11/include/cpython/warnings.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_WARNINGS_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | PyAPI_FUNC(int) PyErr_WarnExplicitObject( 6 | PyObject *category, 7 | PyObject *message, 8 | PyObject *filename, 9 | int lineno, 10 | PyObject *module, 11 | PyObject *registry); 12 | 13 | PyAPI_FUNC(int) PyErr_WarnExplicitFormat( 14 | PyObject *category, 15 | const char *filename, int lineno, 16 | const char *module, PyObject *registry, 17 | const char *format, ...); 18 | 19 | // DEPRECATED: Use PyErr_WarnEx() instead. 20 | #define PyErr_Warn(category, msg) PyErr_WarnEx(category, msg, 1) 21 | -------------------------------------------------------------------------------- /python/3.11/include/enumobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_ENUMOBJECT_H 2 | #define Py_ENUMOBJECT_H 3 | 4 | /* Enumerate Object */ 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | PyAPI_DATA(PyTypeObject) PyEnum_Type; 11 | PyAPI_DATA(PyTypeObject) PyReversed_Type; 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | #endif /* !Py_ENUMOBJECT_H */ 18 | -------------------------------------------------------------------------------- /python/3.11/include/exports.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_EXPORTS_H 2 | #define Py_EXPORTS_H 3 | 4 | #if defined(_WIN32) || defined(__CYGWIN__) 5 | #define Py_IMPORTED_SYMBOL __declspec(dllimport) 6 | #define Py_EXPORTED_SYMBOL __declspec(dllexport) 7 | #define Py_LOCAL_SYMBOL 8 | #else 9 | /* 10 | * If we only ever used gcc >= 5, we could use __has_attribute(visibility) 11 | * as a cross-platform way to determine if visibility is supported. However, 12 | * we may still need to support gcc >= 4, as some Ubuntu LTS and Centos versions 13 | * have 4 < gcc < 5. 14 | */ 15 | #ifndef __has_attribute 16 | #define __has_attribute(x) 0 // Compatibility with non-clang compilers. 17 | #endif 18 | #if (defined(__GNUC__) && (__GNUC__ >= 4)) ||\ 19 | (defined(__clang__) && __has_attribute(visibility)) 20 | #define Py_IMPORTED_SYMBOL __attribute__ ((visibility ("default"))) 21 | #define Py_EXPORTED_SYMBOL __attribute__ ((visibility ("default"))) 22 | #define Py_LOCAL_SYMBOL __attribute__ ((visibility ("hidden"))) 23 | #else 24 | #define Py_IMPORTED_SYMBOL 25 | #define Py_EXPORTED_SYMBOL 26 | #define Py_LOCAL_SYMBOL 27 | #endif 28 | #endif 29 | 30 | #endif /* Py_EXPORTS_H */ 31 | -------------------------------------------------------------------------------- /python/3.11/include/fileutils.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_FILEUTILS_H 2 | #define Py_FILEUTILS_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000 8 | PyAPI_FUNC(wchar_t *) Py_DecodeLocale( 9 | const char *arg, 10 | size_t *size); 11 | 12 | PyAPI_FUNC(char*) Py_EncodeLocale( 13 | const wchar_t *text, 14 | size_t *error_pos); 15 | #endif 16 | 17 | #ifndef Py_LIMITED_API 18 | # define Py_CPYTHON_FILEUTILS_H 19 | # include "cpython/fileutils.h" 20 | # undef Py_CPYTHON_FILEUTILS_H 21 | #endif 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_FILEUTILS_H */ 27 | -------------------------------------------------------------------------------- /python/3.11/include/frameobject.h: -------------------------------------------------------------------------------- 1 | /* Frame object interface */ 2 | 3 | #ifndef Py_FRAMEOBJECT_H 4 | #define Py_FRAMEOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #include "pyframe.h" 10 | 11 | #ifndef Py_LIMITED_API 12 | # define Py_CPYTHON_FRAMEOBJECT_H 13 | # include "cpython/frameobject.h" 14 | # undef Py_CPYTHON_FRAMEOBJECT_H 15 | #endif 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif /* !Py_FRAMEOBJECT_H */ 21 | -------------------------------------------------------------------------------- /python/3.11/include/genericaliasobject.h: -------------------------------------------------------------------------------- 1 | // Implementation of PEP 585: support list[int] etc. 2 | #ifndef Py_GENERICALIASOBJECT_H 3 | #define Py_GENERICALIASOBJECT_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_FUNC(PyObject *) Py_GenericAlias(PyObject *, PyObject *); 9 | PyAPI_DATA(PyTypeObject) Py_GenericAliasType; 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif /* !Py_GENERICALIASOBJECT_H */ 15 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_abstract.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_ABSTRACT_H 2 | #define Py_INTERNAL_ABSTRACT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | // Fast inlined version of PyIndex_Check() 12 | static inline int 13 | _PyIndex_Check(PyObject *obj) 14 | { 15 | PyNumberMethods *tp_as_number = Py_TYPE(obj)->tp_as_number; 16 | return (tp_as_number != NULL && tp_as_number->nb_index != NULL); 17 | } 18 | 19 | PyObject *_PyNumber_PowerNoMod(PyObject *lhs, PyObject *rhs); 20 | PyObject *_PyNumber_InPlacePowerNoMod(PyObject *lhs, PyObject *rhs); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | #endif /* !Py_INTERNAL_ABSTRACT_H */ 26 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_accu.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_LIMITED_API 2 | #ifndef Py_INTERNAL_ACCU_H 3 | #define Py_INTERNAL_ACCU_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | /*** This is a private API for use by the interpreter and the stdlib. 9 | *** Its definition may be changed or removed at any moment. 10 | ***/ 11 | 12 | #ifndef Py_BUILD_CORE 13 | # error "this header requires Py_BUILD_CORE define" 14 | #endif 15 | 16 | /* 17 | * A two-level accumulator of unicode objects that avoids both the overhead 18 | * of keeping a huge number of small separate objects, and the quadratic 19 | * behaviour of using a naive repeated concatenation scheme. 20 | */ 21 | 22 | #undef small /* defined by some Windows headers */ 23 | 24 | typedef struct { 25 | PyObject *large; /* A list of previously accumulated large strings */ 26 | PyObject *small; /* Pending small strings */ 27 | } _PyAccu; 28 | 29 | PyAPI_FUNC(int) _PyAccu_Init(_PyAccu *acc); 30 | PyAPI_FUNC(int) _PyAccu_Accumulate(_PyAccu *acc, PyObject *unicode); 31 | PyAPI_FUNC(PyObject *) _PyAccu_FinishAsList(_PyAccu *acc); 32 | PyAPI_FUNC(PyObject *) _PyAccu_Finish(_PyAccu *acc); 33 | PyAPI_FUNC(void) _PyAccu_Destroy(_PyAccu *acc); 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | #endif /* !Py_INTERNAL_ACCU_H */ 39 | #endif /* !Py_LIMITED_API */ 40 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_compile.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_COMPILE_H 2 | #define Py_INTERNAL_COMPILE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | struct _arena; // Type defined in pycore_pyarena.h 12 | struct _mod; // Type defined in pycore_ast.h 13 | 14 | // Export the symbol for test_peg_generator (built as a library) 15 | PyAPI_FUNC(PyCodeObject*) _PyAST_Compile( 16 | struct _mod *mod, 17 | PyObject *filename, 18 | PyCompilerFlags *flags, 19 | int optimize, 20 | struct _arena *arena); 21 | extern PyFutureFeatures* _PyFuture_FromAST( 22 | struct _mod * mod, 23 | PyObject *filename 24 | ); 25 | 26 | extern PyObject* _Py_Mangle(PyObject *p, PyObject *name); 27 | 28 | typedef struct { 29 | int optimize; 30 | int ff_features; 31 | 32 | int recursion_depth; /* current recursion depth */ 33 | int recursion_limit; /* recursion limit */ 34 | } _PyASTOptimizeState; 35 | 36 | extern int _PyAST_Optimize( 37 | struct _mod *, 38 | struct _arena *arena, 39 | _PyASTOptimizeState *state); 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | #endif /* !Py_INTERNAL_COMPILE_H */ 45 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_dtoa.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | extern "C" { 3 | #endif 4 | 5 | #ifndef Py_BUILD_CORE 6 | # error "this header requires Py_BUILD_CORE define" 7 | #endif 8 | 9 | #include "pycore_pymath.h" // _PY_SHORT_FLOAT_REPR 10 | 11 | 12 | #if _PY_SHORT_FLOAT_REPR == 1 13 | 14 | /* These functions are used by modules compiled as C extension like math: 15 | they must be exported. */ 16 | 17 | PyAPI_FUNC(double) _Py_dg_strtod(const char *str, char **ptr); 18 | PyAPI_FUNC(char *) _Py_dg_dtoa(double d, int mode, int ndigits, 19 | int *decpt, int *sign, char **rve); 20 | PyAPI_FUNC(void) _Py_dg_freedtoa(char *s); 21 | PyAPI_FUNC(double) _Py_dg_stdnan(int sign); 22 | PyAPI_FUNC(double) _Py_dg_infinity(int sign); 23 | 24 | #endif // _PY_SHORT_FLOAT_REPR == 1 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_emscripten_signal.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_EMSCRIPTEN_SIGNAL_H 2 | #define Py_EMSCRIPTEN_SIGNAL_H 3 | 4 | #if defined(__EMSCRIPTEN__) 5 | 6 | void 7 | _Py_CheckEmscriptenSignals(void); 8 | 9 | void 10 | _Py_CheckEmscriptenSignalsPeriodically(void); 11 | 12 | #define _Py_CHECK_EMSCRIPTEN_SIGNALS() _Py_CheckEmscriptenSignals() 13 | 14 | #define _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY() _Py_CheckEmscriptenSignalsPeriodically() 15 | 16 | extern int Py_EMSCRIPTEN_SIGNAL_HANDLING; 17 | 18 | #else 19 | 20 | #define _Py_CHECK_EMSCRIPTEN_SIGNALS() 21 | #define _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY() 22 | 23 | #endif // defined(__EMSCRIPTEN__) 24 | 25 | #endif // ndef Py_EMSCRIPTEN_SIGNAL_H 26 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_exceptions.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_EXCEPTIONS_H 2 | #define Py_INTERNAL_EXCEPTIONS_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | 12 | /* runtime lifecycle */ 13 | 14 | extern PyStatus _PyExc_InitState(PyInterpreterState *); 15 | extern PyStatus _PyExc_InitGlobalObjects(PyInterpreterState *); 16 | extern int _PyExc_InitTypes(PyInterpreterState *); 17 | extern void _PyExc_Fini(PyInterpreterState *); 18 | 19 | 20 | /* other API */ 21 | 22 | struct _Py_exc_state { 23 | // The dict mapping from errno codes to OSError subclasses 24 | PyObject *errnomap; 25 | PyBaseExceptionObject *memerrors_freelist; 26 | int memerrors_numfree; 27 | // The ExceptionGroup type 28 | PyObject *PyExc_ExceptionGroup; 29 | }; 30 | 31 | extern void _PyExc_ClearExceptionGroupType(PyInterpreterState *); 32 | 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | #endif /* !Py_INTERNAL_EXCEPTIONS_H */ 38 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_format.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_FORMAT_H 2 | #define Py_INTERNAL_FORMAT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | /* Format codes 12 | * F_LJUST '-' 13 | * F_SIGN '+' 14 | * F_BLANK ' ' 15 | * F_ALT '#' 16 | * F_ZERO '0' 17 | * F_NO_NEG_0 'z' 18 | */ 19 | #define F_LJUST (1<<0) 20 | #define F_SIGN (1<<1) 21 | #define F_BLANK (1<<2) 22 | #define F_ALT (1<<3) 23 | #define F_ZERO (1<<4) 24 | #define F_NO_NEG_0 (1<<5) 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | #endif /* !Py_INTERNAL_FORMAT_H */ 30 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_function.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_FUNCTION_H 2 | #define Py_INTERNAL_FUNCTION_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | extern PyFunctionObject* _PyFunction_FromConstructor(PyFrameConstructor *constr); 12 | 13 | extern uint32_t _PyFunction_GetVersionForCurrentState(PyFunctionObject *func); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif /* !Py_INTERNAL_FUNCTION_H */ 19 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_genobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_GENOBJECT_H 2 | #define Py_INTERNAL_GENOBJECT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | extern PyObject *_PyGen_yf(PyGenObject *); 12 | extern PyObject *_PyCoro_GetAwaitableIter(PyObject *o); 13 | extern PyObject *_PyAsyncGenValueWrapperNew(PyObject *); 14 | 15 | /* runtime lifecycle */ 16 | 17 | extern void _PyAsyncGen_Fini(PyInterpreterState *); 18 | 19 | 20 | /* other API */ 21 | 22 | #ifndef WITH_FREELISTS 23 | // without freelists 24 | # define _PyAsyncGen_MAXFREELIST 0 25 | #endif 26 | 27 | #ifndef _PyAsyncGen_MAXFREELIST 28 | # define _PyAsyncGen_MAXFREELIST 80 29 | #endif 30 | 31 | struct _Py_async_gen_state { 32 | #if _PyAsyncGen_MAXFREELIST > 0 33 | /* Freelists boost performance 6-10%; they also reduce memory 34 | fragmentation, as _PyAsyncGenWrappedValue and PyAsyncGenASend 35 | are short-living objects that are instantiated for every 36 | __anext__() call. */ 37 | struct _PyAsyncGenWrappedValue* value_freelist[_PyAsyncGen_MAXFREELIST]; 38 | int value_numfree; 39 | 40 | struct PyAsyncGenASend* asend_freelist[_PyAsyncGen_MAXFREELIST]; 41 | int asend_numfree; 42 | #endif 43 | }; 44 | 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | #endif /* !Py_INTERNAL_GENOBJECT_H */ 50 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_getopt.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_PYGETOPT_H 2 | #define Py_INTERNAL_PYGETOPT_H 3 | 4 | #ifndef Py_BUILD_CORE 5 | # error "this header requires Py_BUILD_CORE define" 6 | #endif 7 | 8 | extern int _PyOS_opterr; 9 | extern Py_ssize_t _PyOS_optind; 10 | extern const wchar_t *_PyOS_optarg; 11 | 12 | extern void _PyOS_ResetGetOpt(void); 13 | 14 | typedef struct { 15 | const wchar_t *name; 16 | int has_arg; 17 | int val; 18 | } _PyOS_LongOption; 19 | 20 | extern int _PyOS_GetOpt(Py_ssize_t argc, wchar_t * const *argv, int *longindex); 21 | 22 | #endif /* !Py_INTERNAL_PYGETOPT_H */ 23 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_import.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_LIMITED_API 2 | #ifndef Py_INTERNAL_IMPORT_H 3 | #define Py_INTERNAL_IMPORT_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #ifdef HAVE_FORK 9 | extern PyStatus _PyImport_ReInitLock(void); 10 | #endif 11 | extern PyObject* _PyImport_BootstrapImp(PyThreadState *tstate); 12 | 13 | struct _module_alias { 14 | const char *name; /* ASCII encoded string */ 15 | const char *orig; /* ASCII encoded string */ 16 | }; 17 | 18 | PyAPI_DATA(const struct _frozen *) _PyImport_FrozenBootstrap; 19 | PyAPI_DATA(const struct _frozen *) _PyImport_FrozenStdlib; 20 | PyAPI_DATA(const struct _frozen *) _PyImport_FrozenTest; 21 | extern const struct _module_alias * _PyImport_FrozenAliases; 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_INTERNAL_IMPORT_H */ 27 | #endif /* !Py_LIMITED_API */ 28 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_interpreteridobject.h: -------------------------------------------------------------------------------- 1 | /* Interpreter ID Object */ 2 | 3 | #ifndef Py_INTERNAL_INTERPRETERIDOBJECT_H 4 | #define Py_INTERNAL_INTERPRETERIDOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #ifndef Py_BUILD_CORE 10 | # error "this header requires Py_BUILD_CORE define" 11 | #endif 12 | 13 | PyAPI_DATA(PyTypeObject) _PyInterpreterID_Type; 14 | 15 | PyAPI_FUNC(PyObject *) _PyInterpreterID_New(int64_t); 16 | PyAPI_FUNC(PyObject *) _PyInterpreterState_GetIDObject(PyInterpreterState *); 17 | PyAPI_FUNC(PyInterpreterState *) _PyInterpreterID_LookUp(PyObject *); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif // !Py_INTERNAL_INTERPRETERIDOBJECT_H 23 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_moduleobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_MODULEOBJECT_H 2 | #define Py_INTERNAL_MODULEOBJECT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | typedef struct { 12 | PyObject_HEAD 13 | PyObject *md_dict; 14 | PyModuleDef *md_def; 15 | void *md_state; 16 | PyObject *md_weaklist; 17 | // for logging purposes after md_dict is cleared 18 | PyObject *md_name; 19 | } PyModuleObject; 20 | 21 | static inline PyModuleDef* _PyModule_GetDef(PyObject *mod) { 22 | assert(PyModule_Check(mod)); 23 | return ((PyModuleObject *)mod)->md_def; 24 | } 25 | 26 | static inline void* _PyModule_GetState(PyObject* mod) { 27 | assert(PyModule_Check(mod)); 28 | return ((PyModuleObject *)mod)->md_state; 29 | } 30 | 31 | static inline PyObject* _PyModule_GetDict(PyObject *mod) { 32 | assert(PyModule_Check(mod)); 33 | PyObject *dict = ((PyModuleObject *)mod) -> md_dict; 34 | // _PyModule_GetDict(mod) must not be used after calling module_clear(mod) 35 | assert(dict != NULL); 36 | return dict; 37 | } 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | #endif /* !Py_INTERNAL_MODULEOBJECT_H */ 43 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_namespace.h: -------------------------------------------------------------------------------- 1 | // Simple namespace object interface 2 | 3 | #ifndef Py_INTERNAL_NAMESPACE_H 4 | #define Py_INTERNAL_NAMESPACE_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #ifndef Py_BUILD_CORE 10 | # error "this header requires Py_BUILD_CORE define" 11 | #endif 12 | 13 | PyAPI_DATA(PyTypeObject) _PyNamespace_Type; 14 | 15 | PyAPI_FUNC(PyObject *) _PyNamespace_New(PyObject *kwds); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif // !Py_INTERNAL_NAMESPACE_H 21 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_parser.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_PARSER_H 2 | #define Py_INTERNAL_PARSER_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | extern struct _mod* _PyParser_ASTFromString( 12 | const char *str, 13 | PyObject* filename, 14 | int mode, 15 | PyCompilerFlags *flags, 16 | PyArena *arena); 17 | extern struct _mod* _PyParser_ASTFromFile( 18 | FILE *fp, 19 | PyObject *filename_ob, 20 | const char *enc, 21 | int mode, 22 | const char *ps1, 23 | const char *ps2, 24 | PyCompilerFlags *flags, 25 | int *errcode, 26 | PyArena *arena); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | #endif /* !Py_INTERNAL_PARSER_H */ 32 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_pathconfig.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_PATHCONFIG_H 2 | #define Py_INTERNAL_PATHCONFIG_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | PyAPI_FUNC(void) _PyPathConfig_ClearGlobal(void); 12 | extern PyStatus _PyPathConfig_ReadGlobal(PyConfig *config); 13 | extern PyStatus _PyPathConfig_UpdateGlobal(const PyConfig *config); 14 | extern const wchar_t * _PyPathConfig_GetGlobalModuleSearchPath(void); 15 | 16 | extern int _PyPathConfig_ComputeSysPath0( 17 | const PyWideStringList *argv, 18 | PyObject **path0); 19 | 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | #endif /* !Py_INTERNAL_PATHCONFIG_H */ 25 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_pyhash.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_HASH_H 2 | #define Py_INTERNAL_HASH_H 3 | 4 | #ifndef Py_BUILD_CORE 5 | # error "this header requires Py_BUILD_CORE define" 6 | #endif 7 | 8 | uint64_t _Py_KeyedHash(uint64_t, const char *, Py_ssize_t); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_signal.h: -------------------------------------------------------------------------------- 1 | // Define Py_NSIG constant for signal handling. 2 | 3 | #ifndef Py_INTERNAL_SIGNAL_H 4 | #define Py_INTERNAL_SIGNAL_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #ifndef Py_BUILD_CORE 10 | # error "this header requires Py_BUILD_CORE define" 11 | #endif 12 | 13 | #include // NSIG 14 | 15 | #ifdef _SIG_MAXSIG 16 | // gh-91145: On FreeBSD, defines NSIG as 32: it doesn't include 17 | // realtime signals: [SIGRTMIN,SIGRTMAX]. Use _SIG_MAXSIG instead. For 18 | // example on x86-64 FreeBSD 13, SIGRTMAX is 126 and _SIG_MAXSIG is 128. 19 | # define Py_NSIG _SIG_MAXSIG 20 | #elif defined(NSIG) 21 | # define Py_NSIG NSIG 22 | #elif defined(_NSIG) 23 | # define Py_NSIG _NSIG // BSD/SysV 24 | #elif defined(_SIGMAX) 25 | # define Py_NSIG (_SIGMAX + 1) // QNX 26 | #elif defined(SIGMAX) 27 | # define Py_NSIG (SIGMAX + 1) // djgpp 28 | #else 29 | # define Py_NSIG 64 // Use a reasonable default value 30 | #endif 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | #endif // !Py_INTERNAL_SIGNAL_H 36 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_sliceobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_SLICEOBJECT_H 2 | #define Py_INTERNAL_SLICEOBJECT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | 12 | /* runtime lifecycle */ 13 | 14 | extern void _PySlice_Fini(PyInterpreterState *); 15 | 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif /* !Py_INTERNAL_SLICEOBJECT_H */ 21 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_strhex.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_STRHEX_H 2 | #define Py_INTERNAL_STRHEX_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | // Returns a str() containing the hex representation of argbuf. 12 | PyAPI_FUNC(PyObject*) _Py_strhex(const 13 | char* argbuf, 14 | const Py_ssize_t arglen); 15 | 16 | // Returns a bytes() containing the ASCII hex representation of argbuf. 17 | PyAPI_FUNC(PyObject*) _Py_strhex_bytes( 18 | const char* argbuf, 19 | const Py_ssize_t arglen); 20 | 21 | // These variants include support for a separator between every N bytes: 22 | PyAPI_FUNC(PyObject*) _Py_strhex_with_sep( 23 | const char* argbuf, 24 | const Py_ssize_t arglen, 25 | PyObject* sep, 26 | const int bytes_per_group); 27 | PyAPI_FUNC(PyObject*) _Py_strhex_bytes_with_sep( 28 | const char* argbuf, 29 | const Py_ssize_t arglen, 30 | PyObject* sep, 31 | const int bytes_per_group); 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | #endif /* !Py_INTERNAL_STRHEX_H */ 37 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_structseq.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_STRUCTSEQ_H 2 | #define Py_INTERNAL_STRUCTSEQ_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | 12 | /* other API */ 13 | 14 | PyAPI_FUNC(PyTypeObject *) _PyStructSequence_NewType( 15 | PyStructSequence_Desc *desc, 16 | unsigned long tp_flags); 17 | 18 | PyAPI_FUNC(int) _PyStructSequence_InitType( 19 | PyTypeObject *type, 20 | PyStructSequence_Desc *desc, 21 | unsigned long tp_flags); 22 | 23 | extern void _PyStructSequence_FiniType(PyTypeObject *type); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | #endif /* !Py_INTERNAL_STRUCTSEQ_H */ 29 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_sysmodule.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_SYSMODULE_H 2 | #define Py_INTERNAL_SYSMODULE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | PyAPI_FUNC(int) _PySys_Audit( 12 | PyThreadState *tstate, 13 | const char *event, 14 | const char *argFormat, 15 | ...); 16 | 17 | /* We want minimal exposure of this function, so use extern rather than 18 | PyAPI_FUNC() to not export the symbol. */ 19 | extern void _PySys_ClearAuditHooks(PyThreadState *tstate); 20 | 21 | PyAPI_FUNC(int) _PySys_SetAttr(PyObject *, PyObject *); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_INTERNAL_SYSMODULE_H */ 27 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_typeobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_TYPEOBJECT_H 2 | #define Py_INTERNAL_TYPEOBJECT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | 12 | /* runtime lifecycle */ 13 | 14 | extern PyStatus _PyTypes_InitState(PyInterpreterState *); 15 | extern PyStatus _PyTypes_InitTypes(PyInterpreterState *); 16 | extern void _PyTypes_FiniTypes(PyInterpreterState *); 17 | extern void _PyTypes_Fini(PyInterpreterState *); 18 | 19 | 20 | /* other API */ 21 | 22 | // Type attribute lookup cache: speed up attribute and method lookups, 23 | // see _PyType_Lookup(). 24 | struct type_cache_entry { 25 | unsigned int version; // initialized from type->tp_version_tag 26 | PyObject *name; // reference to exactly a str or None 27 | PyObject *value; // borrowed reference or NULL 28 | }; 29 | 30 | #define MCACHE_SIZE_EXP 12 31 | #define MCACHE_STATS 0 32 | 33 | struct type_cache { 34 | struct type_cache_entry hashtable[1 << MCACHE_SIZE_EXP]; 35 | #if MCACHE_STATS 36 | size_t hits; 37 | size_t misses; 38 | size_t collisions; 39 | #endif 40 | }; 41 | 42 | extern PyStatus _PyTypes_InitSlotDefs(void); 43 | 44 | extern void _PyStaticType_Dealloc(PyTypeObject *type); 45 | 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | #endif /* !Py_INTERNAL_TYPEOBJECT_H */ 51 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_ucnhash.h: -------------------------------------------------------------------------------- 1 | /* Unicode name database interface */ 2 | #ifndef Py_INTERNAL_UCNHASH_H 3 | #define Py_INTERNAL_UCNHASH_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #ifndef Py_BUILD_CORE 9 | # error "this header requires Py_BUILD_CORE define" 10 | #endif 11 | 12 | /* revised ucnhash CAPI interface (exported through a "wrapper") */ 13 | 14 | #define PyUnicodeData_CAPSULE_NAME "unicodedata._ucnhash_CAPI" 15 | 16 | typedef struct { 17 | 18 | /* Get name for a given character code. 19 | Returns non-zero if success, zero if not. 20 | Does not set Python exceptions. */ 21 | int (*getname)(Py_UCS4 code, char* buffer, int buflen, 22 | int with_alias_and_seq); 23 | 24 | /* Get character code for a given name. 25 | Same error handling as for getname(). */ 26 | int (*getcode)(const char* name, int namelen, Py_UCS4* code, 27 | int with_named_seq); 28 | 29 | } _PyUnicode_Name_CAPI; 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | #endif /* !Py_INTERNAL_UCNHASH_H */ 35 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_unionobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_UNIONOBJECT_H 2 | #define Py_INTERNAL_UNIONOBJECT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | extern PyTypeObject _PyUnion_Type; 12 | #define _PyUnion_Check(op) Py_IS_TYPE(op, &_PyUnion_Type) 13 | extern PyObject *_Py_union_type_or(PyObject *, PyObject *); 14 | 15 | #define _PyGenericAlias_Check(op) PyObject_TypeCheck(op, &Py_GenericAliasType) 16 | extern PyObject *_Py_subs_parameters(PyObject *, PyObject *, PyObject *, PyObject *); 17 | extern PyObject *_Py_make_parameters(PyObject *); 18 | extern PyObject *_Py_union_args(PyObject *self); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | #endif /* !Py_INTERNAL_UNIONOBJECT_H */ 24 | -------------------------------------------------------------------------------- /python/3.11/include/internal/pycore_warnings.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_WARNINGS_H 2 | #define Py_INTERNAL_WARNINGS_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | struct _warnings_runtime_state { 12 | /* Both 'filters' and 'onceregistry' can be set in warnings.py; 13 | get_warnings_attr() will reset these variables accordingly. */ 14 | PyObject *filters; /* List */ 15 | PyObject *once_registry; /* Dict */ 16 | PyObject *default_action; /* String */ 17 | long filters_version; 18 | }; 19 | 20 | extern int _PyWarnings_InitState(PyInterpreterState *interp); 21 | 22 | PyAPI_FUNC(PyObject*) _PyWarnings_Init(void); 23 | 24 | extern void _PyErr_WarnUnawaitedCoroutine(PyObject *coro); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | #endif /* !Py_INTERNAL_WARNINGS_H */ 30 | -------------------------------------------------------------------------------- /python/3.11/include/intrcheck.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTRCHECK_H 2 | #define Py_INTRCHECK_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | PyAPI_FUNC(int) PyOS_InterruptOccurred(void); 8 | #ifdef HAVE_FORK 9 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000 10 | PyAPI_FUNC(void) PyOS_BeforeFork(void); 11 | PyAPI_FUNC(void) PyOS_AfterFork_Parent(void); 12 | PyAPI_FUNC(void) PyOS_AfterFork_Child(void); 13 | #endif 14 | #endif 15 | /* Deprecated, please use PyOS_AfterFork_Child() instead */ 16 | Py_DEPRECATED(3.7) PyAPI_FUNC(void) PyOS_AfterFork(void); 17 | 18 | #ifndef Py_LIMITED_API 19 | PyAPI_FUNC(int) _PyOS_IsMainThread(void); 20 | 21 | #ifdef MS_WINDOWS 22 | /* windows.h is not included by Python.h so use void* instead of HANDLE */ 23 | PyAPI_FUNC(void*) _PyOS_SigintEvent(void); 24 | #endif 25 | #endif /* !Py_LIMITED_API */ 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif /* !Py_INTRCHECK_H */ 31 | -------------------------------------------------------------------------------- /python/3.11/include/iterobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_ITEROBJECT_H 2 | #define Py_ITEROBJECT_H 3 | /* Iterators (the basic kind, over a sequence) */ 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_DATA(PyTypeObject) PySeqIter_Type; 9 | PyAPI_DATA(PyTypeObject) PyCallIter_Type; 10 | #ifdef Py_BUILD_CORE 11 | extern PyTypeObject _PyAnextAwaitable_Type; 12 | #endif 13 | 14 | #define PySeqIter_Check(op) Py_IS_TYPE(op, &PySeqIter_Type) 15 | 16 | PyAPI_FUNC(PyObject *) PySeqIter_New(PyObject *); 17 | 18 | 19 | #define PyCallIter_Check(op) Py_IS_TYPE(op, &PyCallIter_Type) 20 | 21 | PyAPI_FUNC(PyObject *) PyCallIter_New(PyObject *, PyObject *); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_ITEROBJECT_H */ 27 | 28 | -------------------------------------------------------------------------------- /python/3.11/include/marshal.h: -------------------------------------------------------------------------------- 1 | 2 | /* Interface for marshal.c */ 3 | 4 | #ifndef Py_MARSHAL_H 5 | #define Py_MARSHAL_H 6 | #ifndef Py_LIMITED_API 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromString(const char *, 13 | Py_ssize_t); 14 | PyAPI_FUNC(PyObject *) PyMarshal_WriteObjectToString(PyObject *, int); 15 | 16 | #define Py_MARSHAL_VERSION 4 17 | 18 | PyAPI_FUNC(long) PyMarshal_ReadLongFromFile(FILE *); 19 | PyAPI_FUNC(int) PyMarshal_ReadShortFromFile(FILE *); 20 | PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromFile(FILE *); 21 | PyAPI_FUNC(PyObject *) PyMarshal_ReadLastObjectFromFile(FILE *); 22 | 23 | PyAPI_FUNC(void) PyMarshal_WriteLongToFile(long, FILE *, int); 24 | PyAPI_FUNC(void) PyMarshal_WriteObjectToFile(PyObject *, FILE *, int); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif /* Py_LIMITED_API */ 31 | #endif /* !Py_MARSHAL_H */ 32 | -------------------------------------------------------------------------------- /python/3.11/include/osdefs.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_OSDEFS_H 2 | #define Py_OSDEFS_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | 8 | /* Operating system dependencies */ 9 | 10 | #ifdef MS_WINDOWS 11 | #define SEP L'\\' 12 | #define ALTSEP L'/' 13 | #define MAXPATHLEN 256 14 | #define DELIM L';' 15 | #endif 16 | 17 | #ifdef __VXWORKS__ 18 | #define DELIM L';' 19 | #endif 20 | 21 | /* Filename separator */ 22 | #ifndef SEP 23 | #define SEP L'/' 24 | #endif 25 | 26 | /* Max pathname length */ 27 | #ifdef __hpux 28 | #include 29 | #include 30 | #ifndef PATH_MAX 31 | #define PATH_MAX MAXPATHLEN 32 | #endif 33 | #endif 34 | 35 | #ifndef MAXPATHLEN 36 | #if defined(PATH_MAX) && PATH_MAX > 1024 37 | #define MAXPATHLEN PATH_MAX 38 | #else 39 | #define MAXPATHLEN 1024 40 | #endif 41 | #endif 42 | 43 | /* Search path entry delimiter */ 44 | #ifndef DELIM 45 | #define DELIM L':' 46 | #endif 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | #endif /* !Py_OSDEFS_H */ 52 | -------------------------------------------------------------------------------- /python/3.11/include/osmodule.h: -------------------------------------------------------------------------------- 1 | 2 | /* os module interface */ 3 | 4 | #ifndef Py_OSMODULE_H 5 | #define Py_OSMODULE_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000 11 | PyAPI_FUNC(PyObject *) PyOS_FSPath(PyObject *path); 12 | #endif 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | #endif /* !Py_OSMODULE_H */ 18 | -------------------------------------------------------------------------------- /python/3.11/include/pyframe.h: -------------------------------------------------------------------------------- 1 | /* Limited C API of PyFrame API 2 | * 3 | * Include "frameobject.h" to get the PyFrameObject structure. 4 | */ 5 | 6 | #ifndef Py_PYFRAME_H 7 | #define Py_PYFRAME_H 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | /* Return the line of code the frame is currently executing. */ 13 | PyAPI_FUNC(int) PyFrame_GetLineNumber(PyFrameObject *); 14 | 15 | PyAPI_FUNC(PyCodeObject *) PyFrame_GetCode(PyFrameObject *frame); 16 | 17 | #ifndef Py_LIMITED_API 18 | # define Py_CPYTHON_PYFRAME_H 19 | # include "cpython/pyframe.h" 20 | # undef Py_CPYTHON_PYFRAME_H 21 | #endif 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_PYFRAME_H */ 27 | -------------------------------------------------------------------------------- /python/3.11/include/pystrcmp.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_STRCMP_H 2 | #define Py_STRCMP_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_FUNC(int) PyOS_mystrnicmp(const char *, const char *, Py_ssize_t); 9 | PyAPI_FUNC(int) PyOS_mystricmp(const char *, const char *); 10 | 11 | #ifdef MS_WINDOWS 12 | #define PyOS_strnicmp strnicmp 13 | #define PyOS_stricmp stricmp 14 | #else 15 | #define PyOS_strnicmp PyOS_mystrnicmp 16 | #define PyOS_stricmp PyOS_mystricmp 17 | #endif 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif /* !Py_STRCMP_H */ 24 | -------------------------------------------------------------------------------- /python/3.11/include/pythonrun.h: -------------------------------------------------------------------------------- 1 | 2 | /* Interfaces to parse and execute pieces of python code */ 3 | 4 | #ifndef Py_PYTHONRUN_H 5 | #define Py_PYTHONRUN_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | PyAPI_FUNC(PyObject *) Py_CompileString(const char *, const char *, int); 11 | 12 | PyAPI_FUNC(void) PyErr_Print(void); 13 | PyAPI_FUNC(void) PyErr_PrintEx(int); 14 | PyAPI_FUNC(void) PyErr_Display(PyObject *, PyObject *, PyObject *); 15 | 16 | 17 | /* Stuff with no proper home (yet) */ 18 | PyAPI_DATA(int) (*PyOS_InputHook)(void); 19 | 20 | /* Stack size, in "pointers" (so we get extra safety margins 21 | on 64-bit platforms). On a 32-bit platform, this translates 22 | to an 8k margin. */ 23 | #define PYOS_STACK_MARGIN 2048 24 | 25 | #if defined(WIN32) && !defined(MS_WIN64) && !defined(_M_ARM) && defined(_MSC_VER) && _MSC_VER >= 1300 26 | /* Enable stack checking under Microsoft C */ 27 | // When changing the platforms, ensure PyOS_CheckStack() docs are still correct 28 | #define USE_STACKCHECK 29 | #endif 30 | 31 | #ifdef USE_STACKCHECK 32 | /* Check that we aren't overflowing our stack */ 33 | PyAPI_FUNC(int) PyOS_CheckStack(void); 34 | #endif 35 | 36 | #ifndef Py_LIMITED_API 37 | # define Py_CPYTHON_PYTHONRUN_H 38 | # include "cpython/pythonrun.h" 39 | # undef Py_CPYTHON_PYTHONRUN_H 40 | #endif 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | #endif /* !Py_PYTHONRUN_H */ 46 | -------------------------------------------------------------------------------- /python/3.11/include/pytypedefs.h: -------------------------------------------------------------------------------- 1 | // Forward declarations of types of the Python C API. 2 | // Declare them at the same place since redefining typedef is a C11 feature. 3 | // Only use a forward declaration if there is an interdependency between two 4 | // header files. 5 | 6 | #ifndef Py_PYTYPEDEFS_H 7 | #define Py_PYTYPEDEFS_H 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | typedef struct PyModuleDef PyModuleDef; 13 | typedef struct PyModuleDef_Slot PyModuleDef_Slot; 14 | typedef struct PyMethodDef PyMethodDef; 15 | typedef struct PyGetSetDef PyGetSetDef; 16 | typedef struct PyMemberDef PyMemberDef; 17 | 18 | typedef struct _object PyObject; 19 | typedef struct _longobject PyLongObject; 20 | typedef struct _typeobject PyTypeObject; 21 | typedef struct PyCodeObject PyCodeObject; 22 | typedef struct _frame PyFrameObject; 23 | 24 | typedef struct _ts PyThreadState; 25 | typedef struct _is PyInterpreterState; 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif // !Py_PYTYPEDEFS_H 31 | -------------------------------------------------------------------------------- /python/3.11/include/rangeobject.h: -------------------------------------------------------------------------------- 1 | 2 | /* Range object interface */ 3 | 4 | #ifndef Py_RANGEOBJECT_H 5 | #define Py_RANGEOBJECT_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | /* 11 | A range object represents an integer range. This is an immutable object; 12 | a range cannot change its value after creation. 13 | 14 | Range objects behave like the corresponding tuple objects except that 15 | they are represented by a start, stop, and step datamembers. 16 | */ 17 | 18 | PyAPI_DATA(PyTypeObject) PyRange_Type; 19 | PyAPI_DATA(PyTypeObject) PyRangeIter_Type; 20 | PyAPI_DATA(PyTypeObject) PyLongRangeIter_Type; 21 | 22 | #define PyRange_Check(op) Py_IS_TYPE(op, &PyRange_Type) 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | #endif /* !Py_RANGEOBJECT_H */ 28 | -------------------------------------------------------------------------------- /python/3.11/include/traceback.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_TRACEBACK_H 2 | #define Py_TRACEBACK_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | /* Traceback interface */ 8 | 9 | PyAPI_FUNC(int) PyTraceBack_Here(PyFrameObject *); 10 | PyAPI_FUNC(int) PyTraceBack_Print(PyObject *, PyObject *); 11 | 12 | /* Reveal traceback type so we can typecheck traceback objects */ 13 | PyAPI_DATA(PyTypeObject) PyTraceBack_Type; 14 | #define PyTraceBack_Check(v) Py_IS_TYPE(v, &PyTraceBack_Type) 15 | 16 | 17 | #ifndef Py_LIMITED_API 18 | # define Py_CPYTHON_TRACEBACK_H 19 | # include "cpython/traceback.h" 20 | # undef Py_CPYTHON_TRACEBACK_H 21 | #endif 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_TRACEBACK_H */ 27 | -------------------------------------------------------------------------------- /python/3.11/include/tracemalloc.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_TRACEMALLOC_H 2 | #define Py_TRACEMALLOC_H 3 | 4 | #ifndef Py_LIMITED_API 5 | /* Track an allocated memory block in the tracemalloc module. 6 | Return 0 on success, return -1 on error (failed to allocate memory to store 7 | the trace). 8 | 9 | Return -2 if tracemalloc is disabled. 10 | 11 | If memory block is already tracked, update the existing trace. */ 12 | PyAPI_FUNC(int) PyTraceMalloc_Track( 13 | unsigned int domain, 14 | uintptr_t ptr, 15 | size_t size); 16 | 17 | /* Untrack an allocated memory block in the tracemalloc module. 18 | Do nothing if the block was not tracked. 19 | 20 | Return -2 if tracemalloc is disabled, otherwise return 0. */ 21 | PyAPI_FUNC(int) PyTraceMalloc_Untrack( 22 | unsigned int domain, 23 | uintptr_t ptr); 24 | 25 | /* Get the traceback where a memory block was allocated. 26 | 27 | Return a tuple of (filename: str, lineno: int) tuples. 28 | 29 | Return None if the tracemalloc module is disabled or if the memory block 30 | is not tracked by tracemalloc. 31 | 32 | Raise an exception and return NULL on error. */ 33 | PyAPI_FUNC(PyObject*) _PyTraceMalloc_GetTraceback( 34 | unsigned int domain, 35 | uintptr_t ptr); 36 | #endif 37 | 38 | #endif /* !Py_TRACEMALLOC_H */ 39 | -------------------------------------------------------------------------------- /python/3.11/include/warnings.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_WARNINGS_H 2 | #define Py_WARNINGS_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | PyAPI_FUNC(int) PyErr_WarnEx( 8 | PyObject *category, 9 | const char *message, /* UTF-8 encoded string */ 10 | Py_ssize_t stack_level); 11 | 12 | PyAPI_FUNC(int) PyErr_WarnFormat( 13 | PyObject *category, 14 | Py_ssize_t stack_level, 15 | const char *format, /* ASCII-encoded string */ 16 | ...); 17 | 18 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000 19 | /* Emit a ResourceWarning warning */ 20 | PyAPI_FUNC(int) PyErr_ResourceWarning( 21 | PyObject *source, 22 | Py_ssize_t stack_level, 23 | const char *format, /* ASCII-encoded string */ 24 | ...); 25 | #endif 26 | 27 | PyAPI_FUNC(int) PyErr_WarnExplicit( 28 | PyObject *category, 29 | const char *message, /* UTF-8 encoded string */ 30 | const char *filename, /* decoded from the filesystem encoding */ 31 | int lineno, 32 | const char *module, /* UTF-8 encoded string */ 33 | PyObject *registry); 34 | 35 | #ifndef Py_LIMITED_API 36 | # define Py_CPYTHON_WARNINGS_H 37 | # include "cpython/warnings.h" 38 | # undef Py_CPYTHON_WARNINGS_H 39 | #endif 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | #endif /* !Py_WARNINGS_H */ 45 | 46 | -------------------------------------------------------------------------------- /python/3.11/include/weakrefobject.h: -------------------------------------------------------------------------------- 1 | /* Weak references objects for Python. */ 2 | 3 | #ifndef Py_WEAKREFOBJECT_H 4 | #define Py_WEAKREFOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | typedef struct _PyWeakReference PyWeakReference; 10 | 11 | PyAPI_DATA(PyTypeObject) _PyWeakref_RefType; 12 | PyAPI_DATA(PyTypeObject) _PyWeakref_ProxyType; 13 | PyAPI_DATA(PyTypeObject) _PyWeakref_CallableProxyType; 14 | 15 | #define PyWeakref_CheckRef(op) PyObject_TypeCheck(op, &_PyWeakref_RefType) 16 | #define PyWeakref_CheckRefExact(op) \ 17 | Py_IS_TYPE(op, &_PyWeakref_RefType) 18 | #define PyWeakref_CheckProxy(op) \ 19 | (Py_IS_TYPE(op, &_PyWeakref_ProxyType) || \ 20 | Py_IS_TYPE(op, &_PyWeakref_CallableProxyType)) 21 | 22 | #define PyWeakref_Check(op) \ 23 | (PyWeakref_CheckRef(op) || PyWeakref_CheckProxy(op)) 24 | 25 | 26 | PyAPI_FUNC(PyObject *) PyWeakref_NewRef(PyObject *ob, 27 | PyObject *callback); 28 | PyAPI_FUNC(PyObject *) PyWeakref_NewProxy(PyObject *ob, 29 | PyObject *callback); 30 | PyAPI_FUNC(PyObject *) PyWeakref_GetObject(PyObject *ref); 31 | 32 | 33 | #ifndef Py_LIMITED_API 34 | # define Py_CPYTHON_WEAKREFOBJECT_H 35 | # include "cpython/weakrefobject.h" 36 | # undef Py_CPYTHON_WEAKREFOBJECT_H 37 | #endif 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | #endif /* !Py_WEAKREFOBJECT_H */ 43 | -------------------------------------------------------------------------------- /python/3.11/lib/python3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flexsim/FlexSimPy/79b0aed7b3e677ceb41754df2dba8cdb4a001a78/python/3.11/lib/python3.lib -------------------------------------------------------------------------------- /python/3.11/lib/python311.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flexsim/FlexSimPy/79b0aed7b3e677ceb41754df2dba8cdb4a001a78/python/3.11/lib/python311.lib -------------------------------------------------------------------------------- /python/3.12/include/bltinmodule.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_BLTINMODULE_H 2 | #define Py_BLTINMODULE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | PyAPI_DATA(PyTypeObject) PyFilter_Type; 8 | PyAPI_DATA(PyTypeObject) PyMap_Type; 9 | PyAPI_DATA(PyTypeObject) PyZip_Type; 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif /* !Py_BLTINMODULE_H */ 15 | -------------------------------------------------------------------------------- /python/3.12/include/boolobject.h: -------------------------------------------------------------------------------- 1 | /* Boolean object interface */ 2 | 3 | #ifndef Py_BOOLOBJECT_H 4 | #define Py_BOOLOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | 10 | // PyBool_Type is declared by object.h 11 | 12 | #define PyBool_Check(x) Py_IS_TYPE((x), &PyBool_Type) 13 | 14 | /* Py_False and Py_True are the only two bools in existence. */ 15 | 16 | /* Don't use these directly */ 17 | PyAPI_DATA(PyLongObject) _Py_FalseStruct; 18 | PyAPI_DATA(PyLongObject) _Py_TrueStruct; 19 | 20 | /* Use these macros */ 21 | #define Py_False _PyObject_CAST(&_Py_FalseStruct) 22 | #define Py_True _PyObject_CAST(&_Py_TrueStruct) 23 | 24 | // Test if an object is the True singleton, the same as "x is True" in Python. 25 | PyAPI_FUNC(int) Py_IsTrue(PyObject *x); 26 | #define Py_IsTrue(x) Py_Is((x), Py_True) 27 | 28 | // Test if an object is the False singleton, the same as "x is False" in Python. 29 | PyAPI_FUNC(int) Py_IsFalse(PyObject *x); 30 | #define Py_IsFalse(x) Py_Is((x), Py_False) 31 | 32 | /* Macros for returning Py_True or Py_False, respectively */ 33 | #define Py_RETURN_TRUE return Py_True 34 | #define Py_RETURN_FALSE return Py_False 35 | 36 | /* Function to return a bool from a C long */ 37 | PyAPI_FUNC(PyObject *) PyBool_FromLong(long); 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | #endif /* !Py_BOOLOBJECT_H */ 43 | -------------------------------------------------------------------------------- /python/3.12/include/compile.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_COMPILE_H 2 | #define Py_COMPILE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | /* These definitions must match corresponding definitions in graminit.h. */ 8 | #define Py_single_input 256 9 | #define Py_file_input 257 10 | #define Py_eval_input 258 11 | #define Py_func_type_input 345 12 | 13 | #ifndef Py_LIMITED_API 14 | # define Py_CPYTHON_COMPILE_H 15 | # include "cpython/compile.h" 16 | # undef Py_CPYTHON_COMPILE_H 17 | #endif 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif /* !Py_COMPILE_H */ 23 | -------------------------------------------------------------------------------- /python/3.12/include/complexobject.h: -------------------------------------------------------------------------------- 1 | /* Complex number structure */ 2 | 3 | #ifndef Py_COMPLEXOBJECT_H 4 | #define Py_COMPLEXOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | /* Complex object interface */ 10 | 11 | PyAPI_DATA(PyTypeObject) PyComplex_Type; 12 | 13 | #define PyComplex_Check(op) PyObject_TypeCheck((op), &PyComplex_Type) 14 | #define PyComplex_CheckExact(op) Py_IS_TYPE((op), &PyComplex_Type) 15 | 16 | PyAPI_FUNC(PyObject *) PyComplex_FromDoubles(double real, double imag); 17 | 18 | PyAPI_FUNC(double) PyComplex_RealAsDouble(PyObject *op); 19 | PyAPI_FUNC(double) PyComplex_ImagAsDouble(PyObject *op); 20 | 21 | #ifndef Py_LIMITED_API 22 | # define Py_CPYTHON_COMPLEXOBJECT_H 23 | # include "cpython/complexobject.h" 24 | # undef Py_CPYTHON_COMPLEXOBJECT_H 25 | #endif 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif /* !Py_COMPLEXOBJECT_H */ 31 | -------------------------------------------------------------------------------- /python/3.12/include/cpython/bytearrayobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_BYTEARRAYOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | /* Object layout */ 6 | typedef struct { 7 | PyObject_VAR_HEAD 8 | Py_ssize_t ob_alloc; /* How many bytes allocated in ob_bytes */ 9 | char *ob_bytes; /* Physical backing buffer */ 10 | char *ob_start; /* Logical start inside ob_bytes */ 11 | Py_ssize_t ob_exports; /* How many buffer exports */ 12 | } PyByteArrayObject; 13 | 14 | PyAPI_DATA(char) _PyByteArray_empty_string[]; 15 | 16 | /* Macros and static inline functions, trading safety for speed */ 17 | #define _PyByteArray_CAST(op) \ 18 | (assert(PyByteArray_Check(op)), _Py_CAST(PyByteArrayObject*, op)) 19 | 20 | static inline char* PyByteArray_AS_STRING(PyObject *op) 21 | { 22 | PyByteArrayObject *self = _PyByteArray_CAST(op); 23 | if (Py_SIZE(self)) { 24 | return self->ob_start; 25 | } 26 | return _PyByteArray_empty_string; 27 | } 28 | #define PyByteArray_AS_STRING(self) PyByteArray_AS_STRING(_PyObject_CAST(self)) 29 | 30 | static inline Py_ssize_t PyByteArray_GET_SIZE(PyObject *op) { 31 | PyByteArrayObject *self = _PyByteArray_CAST(op); 32 | return Py_SIZE(self); 33 | } 34 | #define PyByteArray_GET_SIZE(self) PyByteArray_GET_SIZE(_PyObject_CAST(self)) 35 | -------------------------------------------------------------------------------- /python/3.12/include/cpython/cellobject.h: -------------------------------------------------------------------------------- 1 | /* Cell object interface */ 2 | 3 | #ifndef Py_LIMITED_API 4 | #ifndef Py_CELLOBJECT_H 5 | #define Py_CELLOBJECT_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | typedef struct { 11 | PyObject_HEAD 12 | /* Content of the cell or NULL when empty */ 13 | PyObject *ob_ref; 14 | } PyCellObject; 15 | 16 | PyAPI_DATA(PyTypeObject) PyCell_Type; 17 | 18 | #define PyCell_Check(op) Py_IS_TYPE((op), &PyCell_Type) 19 | 20 | PyAPI_FUNC(PyObject *) PyCell_New(PyObject *); 21 | PyAPI_FUNC(PyObject *) PyCell_Get(PyObject *); 22 | PyAPI_FUNC(int) PyCell_Set(PyObject *, PyObject *); 23 | 24 | static inline PyObject* PyCell_GET(PyObject *op) { 25 | PyCellObject *cell; 26 | assert(PyCell_Check(op)); 27 | cell = _Py_CAST(PyCellObject*, op); 28 | return cell->ob_ref; 29 | } 30 | #define PyCell_GET(op) PyCell_GET(_PyObject_CAST(op)) 31 | 32 | static inline void PyCell_SET(PyObject *op, PyObject *value) { 33 | PyCellObject *cell; 34 | assert(PyCell_Check(op)); 35 | cell = _Py_CAST(PyCellObject*, op); 36 | cell->ob_ref = value; 37 | } 38 | #define PyCell_SET(op, value) PyCell_SET(_PyObject_CAST(op), (value)) 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | #endif /* !Py_TUPLEOBJECT_H */ 44 | #endif /* Py_LIMITED_API */ 45 | -------------------------------------------------------------------------------- /python/3.12/include/cpython/fileobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_FILEOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | PyAPI_FUNC(char *) Py_UniversalNewlineFgets(char *, int, FILE*, PyObject *); 6 | PyAPI_FUNC(char *) _Py_UniversalNewlineFgetsWithSize(char *, int, FILE*, PyObject *, size_t*); 7 | 8 | /* The std printer acts as a preliminary sys.stderr until the new io 9 | infrastructure is in place. */ 10 | PyAPI_FUNC(PyObject *) PyFile_NewStdPrinter(int); 11 | PyAPI_DATA(PyTypeObject) PyStdPrinter_Type; 12 | 13 | typedef PyObject * (*Py_OpenCodeHookFunction)(PyObject *, void *); 14 | 15 | PyAPI_FUNC(PyObject *) PyFile_OpenCode(const char *utf8path); 16 | PyAPI_FUNC(PyObject *) PyFile_OpenCodeObject(PyObject *path); 17 | PyAPI_FUNC(int) PyFile_SetOpenCodeHook(Py_OpenCodeHookFunction hook, void *userData); 18 | 19 | PyAPI_FUNC(int) _PyLong_FileDescriptor_Converter(PyObject *, void *); 20 | -------------------------------------------------------------------------------- /python/3.12/include/cpython/fileutils.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_FILEUTILS_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | // Used by _testcapi which must not use the internal C API 6 | PyAPI_FUNC(FILE*) _Py_fopen_obj( 7 | PyObject *path, 8 | const char *mode); 9 | -------------------------------------------------------------------------------- /python/3.12/include/cpython/floatobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_FLOATOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | typedef struct { 6 | PyObject_HEAD 7 | double ob_fval; 8 | } PyFloatObject; 9 | 10 | #define _PyFloat_CAST(op) \ 11 | (assert(PyFloat_Check(op)), _Py_CAST(PyFloatObject*, op)) 12 | 13 | // Static inline version of PyFloat_AsDouble() trading safety for speed. 14 | // It doesn't check if op is a double object. 15 | static inline double PyFloat_AS_DOUBLE(PyObject *op) { 16 | return _PyFloat_CAST(op)->ob_fval; 17 | } 18 | #define PyFloat_AS_DOUBLE(op) PyFloat_AS_DOUBLE(_PyObject_CAST(op)) 19 | 20 | 21 | PyAPI_FUNC(int) PyFloat_Pack2(double x, char *p, int le); 22 | PyAPI_FUNC(int) PyFloat_Pack4(double x, char *p, int le); 23 | PyAPI_FUNC(int) PyFloat_Pack8(double x, char *p, int le); 24 | 25 | PyAPI_FUNC(double) PyFloat_Unpack2(const char *p, int le); 26 | PyAPI_FUNC(double) PyFloat_Unpack4(const char *p, int le); 27 | PyAPI_FUNC(double) PyFloat_Unpack8(const char *p, int le); 28 | -------------------------------------------------------------------------------- /python/3.12/include/cpython/frameobject.h: -------------------------------------------------------------------------------- 1 | /* Frame object interface */ 2 | 3 | #ifndef Py_CPYTHON_FRAMEOBJECT_H 4 | # error "this header file must not be included directly" 5 | #endif 6 | 7 | /* Standard object interface */ 8 | 9 | PyAPI_FUNC(PyFrameObject *) PyFrame_New(PyThreadState *, PyCodeObject *, 10 | PyObject *, PyObject *); 11 | 12 | /* The rest of the interface is specific for frame objects */ 13 | 14 | /* Conversions between "fast locals" and locals in dictionary */ 15 | 16 | PyAPI_FUNC(void) PyFrame_LocalsToFast(PyFrameObject *, int); 17 | 18 | /* -- Caveat emptor -- 19 | * The concept of entry frames is an implementation detail of the CPython 20 | * interpreter. This API is considered unstable and is provided for the 21 | * convenience of debuggers, profilers and state-inspecting tools. Notice that 22 | * this API can be changed in future minor versions if the underlying frame 23 | * mechanism change or the concept of an 'entry frame' or its semantics becomes 24 | * obsolete or outdated. */ 25 | 26 | PyAPI_FUNC(int) _PyFrame_IsEntryFrame(PyFrameObject *frame); 27 | 28 | PyAPI_FUNC(int) PyFrame_FastToLocalsWithError(PyFrameObject *f); 29 | PyAPI_FUNC(void) PyFrame_FastToLocals(PyFrameObject *); 30 | -------------------------------------------------------------------------------- /python/3.12/include/cpython/interpreteridobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_INTERPRETERIDOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | /* Interpreter ID Object */ 6 | 7 | PyAPI_DATA(PyTypeObject) _PyInterpreterID_Type; 8 | 9 | PyAPI_FUNC(PyObject *) _PyInterpreterID_New(int64_t); 10 | PyAPI_FUNC(PyObject *) _PyInterpreterState_GetIDObject(PyInterpreterState *); 11 | PyAPI_FUNC(PyInterpreterState *) _PyInterpreterID_LookUp(PyObject *); 12 | -------------------------------------------------------------------------------- /python/3.12/include/cpython/picklebufobject.h: -------------------------------------------------------------------------------- 1 | /* PickleBuffer object. This is built-in for ease of use from third-party 2 | * C extensions. 3 | */ 4 | 5 | #ifndef Py_PICKLEBUFOBJECT_H 6 | #define Py_PICKLEBUFOBJECT_H 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #ifndef Py_LIMITED_API 12 | 13 | PyAPI_DATA(PyTypeObject) PyPickleBuffer_Type; 14 | 15 | #define PyPickleBuffer_Check(op) Py_IS_TYPE((op), &PyPickleBuffer_Type) 16 | 17 | /* Create a PickleBuffer redirecting to the given buffer-enabled object */ 18 | PyAPI_FUNC(PyObject *) PyPickleBuffer_FromObject(PyObject *); 19 | /* Get the PickleBuffer's underlying view to the original object 20 | * (NULL if released) 21 | */ 22 | PyAPI_FUNC(const Py_buffer *) PyPickleBuffer_GetBuffer(PyObject *); 23 | /* Release the PickleBuffer. Returns 0 on success, -1 on error. */ 24 | PyAPI_FUNC(int) PyPickleBuffer_Release(PyObject *); 25 | 26 | #endif /* !Py_LIMITED_API */ 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | #endif /* !Py_PICKLEBUFOBJECT_H */ 32 | -------------------------------------------------------------------------------- /python/3.12/include/cpython/pyfpe.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_PYFPE_H 2 | #define Py_PYFPE_H 3 | /* Header excluded from the stable API */ 4 | #ifndef Py_LIMITED_API 5 | 6 | /* These macros used to do something when Python was built with --with-fpectl, 7 | * but support for that was dropped in 3.7. We continue to define them though, 8 | * to avoid breaking API users. 9 | */ 10 | 11 | #define PyFPE_START_PROTECT(err_string, leave_stmt) 12 | #define PyFPE_END_PROTECT(v) 13 | 14 | #endif /* !defined(Py_LIMITED_API) */ 15 | #endif /* !Py_PYFPE_H */ 16 | -------------------------------------------------------------------------------- /python/3.12/include/cpython/sysmodule.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_SYSMODULE_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | PyAPI_FUNC(PyObject *) _PySys_GetAttr(PyThreadState *tstate, 6 | PyObject *name); 7 | 8 | PyAPI_FUNC(size_t) _PySys_GetSizeOf(PyObject *); 9 | 10 | typedef int(*Py_AuditHookFunction)(const char *, PyObject *, void *); 11 | 12 | PyAPI_FUNC(int) PySys_Audit( 13 | const char *event, 14 | const char *argFormat, 15 | ...); 16 | PyAPI_FUNC(int) PySys_AddAuditHook(Py_AuditHookFunction, void*); 17 | -------------------------------------------------------------------------------- /python/3.12/include/cpython/traceback.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_TRACEBACK_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | typedef struct _traceback PyTracebackObject; 6 | 7 | struct _traceback { 8 | PyObject_HEAD 9 | PyTracebackObject *tb_next; 10 | PyFrameObject *tb_frame; 11 | int tb_lasti; 12 | int tb_lineno; 13 | }; 14 | 15 | PyAPI_FUNC(int) _Py_DisplaySourceLine(PyObject *, PyObject *, int, int, int *, PyObject **); 16 | PyAPI_FUNC(void) _PyTraceback_Add(const char *, const char *, int); 17 | -------------------------------------------------------------------------------- /python/3.12/include/cpython/warnings.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_WARNINGS_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | PyAPI_FUNC(int) PyErr_WarnExplicitObject( 6 | PyObject *category, 7 | PyObject *message, 8 | PyObject *filename, 9 | int lineno, 10 | PyObject *module, 11 | PyObject *registry); 12 | 13 | PyAPI_FUNC(int) PyErr_WarnExplicitFormat( 14 | PyObject *category, 15 | const char *filename, int lineno, 16 | const char *module, PyObject *registry, 17 | const char *format, ...); 18 | 19 | // DEPRECATED: Use PyErr_WarnEx() instead. 20 | #define PyErr_Warn(category, msg) PyErr_WarnEx((category), (msg), 1) 21 | -------------------------------------------------------------------------------- /python/3.12/include/enumobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_ENUMOBJECT_H 2 | #define Py_ENUMOBJECT_H 3 | 4 | /* Enumerate Object */ 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | PyAPI_DATA(PyTypeObject) PyEnum_Type; 11 | PyAPI_DATA(PyTypeObject) PyReversed_Type; 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | #endif /* !Py_ENUMOBJECT_H */ 18 | -------------------------------------------------------------------------------- /python/3.12/include/exports.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_EXPORTS_H 2 | #define Py_EXPORTS_H 3 | 4 | #if defined(_WIN32) || defined(__CYGWIN__) 5 | #if defined(Py_ENABLE_SHARED) 6 | #define Py_IMPORTED_SYMBOL __declspec(dllimport) 7 | #define Py_EXPORTED_SYMBOL __declspec(dllexport) 8 | #define Py_LOCAL_SYMBOL 9 | #else 10 | #define Py_IMPORTED_SYMBOL 11 | #define Py_EXPORTED_SYMBOL 12 | #define Py_LOCAL_SYMBOL 13 | #endif 14 | #else 15 | /* 16 | * If we only ever used gcc >= 5, we could use __has_attribute(visibility) 17 | * as a cross-platform way to determine if visibility is supported. However, 18 | * we may still need to support gcc >= 4, as some Ubuntu LTS and Centos versions 19 | * have 4 < gcc < 5. 20 | */ 21 | #ifndef __has_attribute 22 | #define __has_attribute(x) 0 // Compatibility with non-clang compilers. 23 | #endif 24 | #if (defined(__GNUC__) && (__GNUC__ >= 4)) ||\ 25 | (defined(__clang__) && __has_attribute(visibility)) 26 | #define Py_IMPORTED_SYMBOL __attribute__ ((visibility ("default"))) 27 | #define Py_EXPORTED_SYMBOL __attribute__ ((visibility ("default"))) 28 | #define Py_LOCAL_SYMBOL __attribute__ ((visibility ("hidden"))) 29 | #else 30 | #define Py_IMPORTED_SYMBOL 31 | #define Py_EXPORTED_SYMBOL 32 | #define Py_LOCAL_SYMBOL 33 | #endif 34 | #endif 35 | 36 | #endif /* Py_EXPORTS_H */ 37 | -------------------------------------------------------------------------------- /python/3.12/include/fileutils.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_FILEUTILS_H 2 | #define Py_FILEUTILS_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000 8 | PyAPI_FUNC(wchar_t *) Py_DecodeLocale( 9 | const char *arg, 10 | size_t *size); 11 | 12 | PyAPI_FUNC(char*) Py_EncodeLocale( 13 | const wchar_t *text, 14 | size_t *error_pos); 15 | #endif 16 | 17 | #ifndef Py_LIMITED_API 18 | # define Py_CPYTHON_FILEUTILS_H 19 | # include "cpython/fileutils.h" 20 | # undef Py_CPYTHON_FILEUTILS_H 21 | #endif 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_FILEUTILS_H */ 27 | -------------------------------------------------------------------------------- /python/3.12/include/frameobject.h: -------------------------------------------------------------------------------- 1 | /* Frame object interface */ 2 | 3 | #ifndef Py_FRAMEOBJECT_H 4 | #define Py_FRAMEOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #include "pyframe.h" 10 | 11 | #ifndef Py_LIMITED_API 12 | # define Py_CPYTHON_FRAMEOBJECT_H 13 | # include "cpython/frameobject.h" 14 | # undef Py_CPYTHON_FRAMEOBJECT_H 15 | #endif 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif /* !Py_FRAMEOBJECT_H */ 21 | -------------------------------------------------------------------------------- /python/3.12/include/genericaliasobject.h: -------------------------------------------------------------------------------- 1 | // Implementation of PEP 585: support list[int] etc. 2 | #ifndef Py_GENERICALIASOBJECT_H 3 | #define Py_GENERICALIASOBJECT_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_FUNC(PyObject *) Py_GenericAlias(PyObject *, PyObject *); 9 | PyAPI_DATA(PyTypeObject) Py_GenericAliasType; 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif /* !Py_GENERICALIASOBJECT_H */ 15 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_abstract.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_ABSTRACT_H 2 | #define Py_INTERNAL_ABSTRACT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | // Fast inlined version of PyIndex_Check() 12 | static inline int 13 | _PyIndex_Check(PyObject *obj) 14 | { 15 | PyNumberMethods *tp_as_number = Py_TYPE(obj)->tp_as_number; 16 | return (tp_as_number != NULL && tp_as_number->nb_index != NULL); 17 | } 18 | 19 | PyObject *_PyNumber_PowerNoMod(PyObject *lhs, PyObject *rhs); 20 | PyObject *_PyNumber_InPlacePowerNoMod(PyObject *lhs, PyObject *rhs); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | #endif /* !Py_INTERNAL_ABSTRACT_H */ 26 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_descrobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_DESCROBJECT_H 2 | #define Py_INTERNAL_DESCROBJECT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | typedef struct { 12 | PyObject_HEAD 13 | PyObject *prop_get; 14 | PyObject *prop_set; 15 | PyObject *prop_del; 16 | PyObject *prop_doc; 17 | PyObject *prop_name; 18 | int getter_doc; 19 | } propertyobject; 20 | 21 | typedef propertyobject _PyPropertyObject; 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_INTERNAL_DESCROBJECT_H */ 27 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_dict_state.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_DICT_STATE_H 2 | #define Py_INTERNAL_DICT_STATE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | 12 | #ifndef WITH_FREELISTS 13 | // without freelists 14 | # define PyDict_MAXFREELIST 0 15 | #endif 16 | 17 | #ifndef PyDict_MAXFREELIST 18 | # define PyDict_MAXFREELIST 80 19 | #endif 20 | 21 | #define DICT_MAX_WATCHERS 8 22 | 23 | struct _Py_dict_state { 24 | /*Global counter used to set ma_version_tag field of dictionary. 25 | * It is incremented each time that a dictionary is created and each 26 | * time that a dictionary is modified. */ 27 | uint64_t global_version; 28 | uint32_t next_keys_version; 29 | 30 | #if PyDict_MAXFREELIST > 0 31 | /* Dictionary reuse scheme to save calls to malloc and free */ 32 | PyDictObject *free_list[PyDict_MAXFREELIST]; 33 | PyDictKeysObject *keys_free_list[PyDict_MAXFREELIST]; 34 | int numfree; 35 | int keys_numfree; 36 | #endif 37 | 38 | PyDict_WatchCallback watchers[DICT_MAX_WATCHERS]; 39 | }; 40 | 41 | #define _dict_state_INIT \ 42 | { \ 43 | .next_keys_version = 2, \ 44 | } 45 | 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | #endif /* !Py_INTERNAL_DICT_STATE_H */ 51 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_emscripten_signal.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_EMSCRIPTEN_SIGNAL_H 2 | #define Py_EMSCRIPTEN_SIGNAL_H 3 | 4 | #if defined(__EMSCRIPTEN__) 5 | 6 | void 7 | _Py_CheckEmscriptenSignals(void); 8 | 9 | void 10 | _Py_CheckEmscriptenSignalsPeriodically(void); 11 | 12 | #define _Py_CHECK_EMSCRIPTEN_SIGNALS() _Py_CheckEmscriptenSignals() 13 | 14 | #define _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY() _Py_CheckEmscriptenSignalsPeriodically() 15 | 16 | extern int Py_EMSCRIPTEN_SIGNAL_HANDLING; 17 | 18 | #else 19 | 20 | #define _Py_CHECK_EMSCRIPTEN_SIGNALS() 21 | #define _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY() 22 | 23 | #endif // defined(__EMSCRIPTEN__) 24 | 25 | #endif // ndef Py_EMSCRIPTEN_SIGNAL_H 26 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_exceptions.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_EXCEPTIONS_H 2 | #define Py_INTERNAL_EXCEPTIONS_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | 12 | /* runtime lifecycle */ 13 | 14 | extern PyStatus _PyExc_InitState(PyInterpreterState *); 15 | extern PyStatus _PyExc_InitGlobalObjects(PyInterpreterState *); 16 | extern int _PyExc_InitTypes(PyInterpreterState *); 17 | extern void _PyExc_Fini(PyInterpreterState *); 18 | 19 | 20 | /* other API */ 21 | 22 | struct _Py_exc_state { 23 | // The dict mapping from errno codes to OSError subclasses 24 | PyObject *errnomap; 25 | PyBaseExceptionObject *memerrors_freelist; 26 | int memerrors_numfree; 27 | // The ExceptionGroup type 28 | PyObject *PyExc_ExceptionGroup; 29 | }; 30 | 31 | extern void _PyExc_ClearExceptionGroupType(PyInterpreterState *); 32 | 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | #endif /* !Py_INTERNAL_EXCEPTIONS_H */ 38 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_format.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_FORMAT_H 2 | #define Py_INTERNAL_FORMAT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | /* Format codes 12 | * F_LJUST '-' 13 | * F_SIGN '+' 14 | * F_BLANK ' ' 15 | * F_ALT '#' 16 | * F_ZERO '0' 17 | */ 18 | #define F_LJUST (1<<0) 19 | #define F_SIGN (1<<1) 20 | #define F_BLANK (1<<2) 21 | #define F_ALT (1<<3) 22 | #define F_ZERO (1<<4) 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | #endif /* !Py_INTERNAL_FORMAT_H */ 28 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_function.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_FUNCTION_H 2 | #define Py_INTERNAL_FUNCTION_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | #define FUNC_MAX_WATCHERS 8 12 | 13 | struct _py_func_state { 14 | uint32_t next_version; 15 | }; 16 | 17 | extern PyFunctionObject* _PyFunction_FromConstructor(PyFrameConstructor *constr); 18 | 19 | extern uint32_t _PyFunction_GetVersionForCurrentState(PyFunctionObject *func); 20 | extern PyObject *_Py_set_function_type_params( 21 | PyThreadState* unused, PyObject *func, PyObject *type_params); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_INTERNAL_FUNCTION_H */ 27 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_getopt.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_PYGETOPT_H 2 | #define Py_INTERNAL_PYGETOPT_H 3 | 4 | #ifndef Py_BUILD_CORE 5 | # error "this header requires Py_BUILD_CORE define" 6 | #endif 7 | 8 | extern int _PyOS_opterr; 9 | extern Py_ssize_t _PyOS_optind; 10 | extern const wchar_t *_PyOS_optarg; 11 | 12 | extern void _PyOS_ResetGetOpt(void); 13 | 14 | typedef struct { 15 | const wchar_t *name; 16 | int has_arg; 17 | int val; 18 | } _PyOS_LongOption; 19 | 20 | extern int _PyOS_GetOpt(Py_ssize_t argc, wchar_t * const *argv, int *longindex); 21 | 22 | #endif /* !Py_INTERNAL_PYGETOPT_H */ 23 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_memoryobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_MEMORYOBJECT_H 2 | #define Py_INTERNAL_MEMORYOBJECT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | PyObject * 12 | _PyMemoryView_FromBufferProc(PyObject *v, int flags, 13 | getbufferproc bufferproc); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif /* !Py_INTERNAL_MEMORYOBJECT_H */ 19 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_moduleobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_MODULEOBJECT_H 2 | #define Py_INTERNAL_MODULEOBJECT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | typedef struct { 12 | PyObject_HEAD 13 | PyObject *md_dict; 14 | PyModuleDef *md_def; 15 | void *md_state; 16 | PyObject *md_weaklist; 17 | // for logging purposes after md_dict is cleared 18 | PyObject *md_name; 19 | } PyModuleObject; 20 | 21 | static inline PyModuleDef* _PyModule_GetDef(PyObject *mod) { 22 | assert(PyModule_Check(mod)); 23 | return ((PyModuleObject *)mod)->md_def; 24 | } 25 | 26 | static inline void* _PyModule_GetState(PyObject* mod) { 27 | assert(PyModule_Check(mod)); 28 | return ((PyModuleObject *)mod)->md_state; 29 | } 30 | 31 | static inline PyObject* _PyModule_GetDict(PyObject *mod) { 32 | assert(PyModule_Check(mod)); 33 | PyObject *dict = ((PyModuleObject *)mod) -> md_dict; 34 | // _PyModule_GetDict(mod) must not be used after calling module_clear(mod) 35 | assert(dict != NULL); 36 | return dict; 37 | } 38 | 39 | PyObject* _Py_module_getattro_impl(PyModuleObject *m, PyObject *name, int suppress); 40 | PyObject* _Py_module_getattro(PyModuleObject *m, PyObject *name); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | #endif /* !Py_INTERNAL_MODULEOBJECT_H */ 46 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_namespace.h: -------------------------------------------------------------------------------- 1 | // Simple namespace object interface 2 | 3 | #ifndef Py_INTERNAL_NAMESPACE_H 4 | #define Py_INTERNAL_NAMESPACE_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #ifndef Py_BUILD_CORE 10 | # error "this header requires Py_BUILD_CORE define" 11 | #endif 12 | 13 | PyAPI_DATA(PyTypeObject) _PyNamespace_Type; 14 | 15 | PyAPI_FUNC(PyObject *) _PyNamespace_New(PyObject *kwds); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif // !Py_INTERNAL_NAMESPACE_H 21 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_object_state.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_OBJECT_STATE_H 2 | #define Py_INTERNAL_OBJECT_STATE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | struct _py_object_runtime_state { 12 | #ifdef Py_REF_DEBUG 13 | Py_ssize_t interpreter_leaks; 14 | #endif 15 | int _not_used; 16 | }; 17 | 18 | struct _py_object_state { 19 | #ifdef Py_REF_DEBUG 20 | Py_ssize_t reftotal; 21 | #endif 22 | #ifdef Py_TRACE_REFS 23 | /* Head of circular doubly-linked list of all objects. These are linked 24 | * together via the _ob_prev and _ob_next members of a PyObject, which 25 | * exist only in a Py_TRACE_REFS build. 26 | */ 27 | PyObject refchain; 28 | #endif 29 | int _not_used; 30 | }; 31 | 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | #endif /* !Py_INTERNAL_OBJECT_STATE_H */ 37 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_pathconfig.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_PATHCONFIG_H 2 | #define Py_INTERNAL_PATHCONFIG_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | PyAPI_FUNC(void) _PyPathConfig_ClearGlobal(void); 12 | extern PyStatus _PyPathConfig_ReadGlobal(PyConfig *config); 13 | extern PyStatus _PyPathConfig_UpdateGlobal(const PyConfig *config); 14 | extern const wchar_t * _PyPathConfig_GetGlobalModuleSearchPath(void); 15 | 16 | extern int _PyPathConfig_ComputeSysPath0( 17 | const PyWideStringList *argv, 18 | PyObject **path0); 19 | 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | #endif /* !Py_INTERNAL_PATHCONFIG_H */ 25 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_pyhash.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_HASH_H 2 | #define Py_INTERNAL_HASH_H 3 | 4 | #ifndef Py_BUILD_CORE 5 | # error "this header requires Py_BUILD_CORE define" 6 | #endif 7 | 8 | 9 | struct pyhash_runtime_state { 10 | struct { 11 | #ifndef MS_WINDOWS 12 | int fd; 13 | dev_t st_dev; 14 | ino_t st_ino; 15 | #else 16 | // This is a placeholder so the struct isn't empty on Windows. 17 | int _not_used; 18 | #endif 19 | } urandom_cache; 20 | }; 21 | 22 | #ifndef MS_WINDOWS 23 | # define _py_urandom_cache_INIT \ 24 | { \ 25 | .fd = -1, \ 26 | } 27 | #else 28 | # define _py_urandom_cache_INIT {0} 29 | #endif 30 | 31 | #define pyhash_state_INIT \ 32 | { \ 33 | .urandom_cache = _py_urandom_cache_INIT, \ 34 | } 35 | 36 | 37 | uint64_t _Py_KeyedHash(uint64_t, const char *, Py_ssize_t); 38 | 39 | 40 | #endif // Py_INTERNAL_HASH_H 41 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_range.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_RANGE_H 2 | #define Py_INTERNAL_RANGE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | typedef struct { 12 | PyObject_HEAD 13 | long start; 14 | long step; 15 | long len; 16 | } _PyRangeIterObject; 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | #endif /* !Py_INTERNAL_RANGE_H */ 22 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_sliceobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_SLICEOBJECT_H 2 | #define Py_INTERNAL_SLICEOBJECT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | 12 | /* runtime lifecycle */ 13 | 14 | extern void _PySlice_Fini(PyInterpreterState *); 15 | 16 | extern PyObject * 17 | _PyBuildSlice_ConsumeRefs(PyObject *start, PyObject *stop); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif /* !Py_INTERNAL_SLICEOBJECT_H */ 23 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_strhex.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_STRHEX_H 2 | #define Py_INTERNAL_STRHEX_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | // Returns a str() containing the hex representation of argbuf. 12 | PyAPI_FUNC(PyObject*) _Py_strhex(const 13 | char* argbuf, 14 | const Py_ssize_t arglen); 15 | 16 | // Returns a bytes() containing the ASCII hex representation of argbuf. 17 | PyAPI_FUNC(PyObject*) _Py_strhex_bytes( 18 | const char* argbuf, 19 | const Py_ssize_t arglen); 20 | 21 | // These variants include support for a separator between every N bytes: 22 | PyAPI_FUNC(PyObject*) _Py_strhex_with_sep( 23 | const char* argbuf, 24 | const Py_ssize_t arglen, 25 | PyObject* sep, 26 | const int bytes_per_group); 27 | PyAPI_FUNC(PyObject*) _Py_strhex_bytes_with_sep( 28 | const char* argbuf, 29 | const Py_ssize_t arglen, 30 | PyObject* sep, 31 | const int bytes_per_group); 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | #endif /* !Py_INTERNAL_STRHEX_H */ 37 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_structseq.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_STRUCTSEQ_H 2 | #define Py_INTERNAL_STRUCTSEQ_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | 12 | /* other API */ 13 | 14 | PyAPI_FUNC(PyTypeObject *) _PyStructSequence_NewType( 15 | PyStructSequence_Desc *desc, 16 | unsigned long tp_flags); 17 | 18 | extern int _PyStructSequence_InitBuiltinWithFlags( 19 | PyInterpreterState *interp, 20 | PyTypeObject *type, 21 | PyStructSequence_Desc *desc, 22 | unsigned long tp_flags); 23 | 24 | static inline int 25 | _PyStructSequence_InitBuiltin(PyInterpreterState *interp, 26 | PyTypeObject *type, 27 | PyStructSequence_Desc *desc) 28 | { 29 | return _PyStructSequence_InitBuiltinWithFlags(interp, type, desc, 0); 30 | } 31 | 32 | extern void _PyStructSequence_FiniBuiltin( 33 | PyInterpreterState *interp, 34 | PyTypeObject *type); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | #endif /* !Py_INTERNAL_STRUCTSEQ_H */ 40 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_sysmodule.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_SYSMODULE_H 2 | #define Py_INTERNAL_SYSMODULE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | PyAPI_FUNC(int) _PySys_Audit( 12 | PyThreadState *tstate, 13 | const char *event, 14 | const char *argFormat, 15 | ...); 16 | 17 | /* We want minimal exposure of this function, so use extern rather than 18 | PyAPI_FUNC() to not export the symbol. */ 19 | extern void _PySys_ClearAuditHooks(PyThreadState *tstate); 20 | 21 | PyAPI_FUNC(int) _PySys_SetAttr(PyObject *, PyObject *); 22 | 23 | extern int _PySys_ClearAttrString(PyInterpreterState *interp, 24 | const char *name, int verbose); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | #endif /* !Py_INTERNAL_SYSMODULE_H */ 30 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_time.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_TIME_H 2 | #define Py_INTERNAL_TIME_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | 12 | struct _time_runtime_state { 13 | #ifdef HAVE_TIMES 14 | int ticks_per_second_initialized; 15 | long ticks_per_second; 16 | #else 17 | int _not_used; 18 | #endif 19 | }; 20 | 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | #endif /* !Py_INTERNAL_TIME_H */ 26 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_typevarobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_TYPEVAROBJECT_H 2 | #define Py_INTERNAL_TYPEVAROBJECT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | extern PyObject *_Py_make_typevar(PyObject *, PyObject *, PyObject *); 12 | extern PyObject *_Py_make_paramspec(PyThreadState *, PyObject *); 13 | extern PyObject *_Py_make_typevartuple(PyThreadState *, PyObject *); 14 | extern PyObject *_Py_make_typealias(PyThreadState *, PyObject *); 15 | extern PyObject *_Py_subscript_generic(PyThreadState *, PyObject *); 16 | extern int _Py_initialize_generic(PyInterpreterState *); 17 | extern void _Py_clear_generic_types(PyInterpreterState *); 18 | 19 | extern PyTypeObject _PyTypeAlias_Type; 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | #endif /* !Py_INTERNAL_TYPEVAROBJECT_H */ 25 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_ucnhash.h: -------------------------------------------------------------------------------- 1 | /* Unicode name database interface */ 2 | #ifndef Py_INTERNAL_UCNHASH_H 3 | #define Py_INTERNAL_UCNHASH_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #ifndef Py_BUILD_CORE 9 | # error "this header requires Py_BUILD_CORE define" 10 | #endif 11 | 12 | /* revised ucnhash CAPI interface (exported through a "wrapper") */ 13 | 14 | #define PyUnicodeData_CAPSULE_NAME "unicodedata._ucnhash_CAPI" 15 | 16 | typedef struct { 17 | 18 | /* Get name for a given character code. 19 | Returns non-zero if success, zero if not. 20 | Does not set Python exceptions. */ 21 | int (*getname)(Py_UCS4 code, char* buffer, int buflen, 22 | int with_alias_and_seq); 23 | 24 | /* Get character code for a given name. 25 | Same error handling as for getname(). */ 26 | int (*getcode)(const char* name, int namelen, Py_UCS4* code, 27 | int with_named_seq); 28 | 29 | } _PyUnicode_Name_CAPI; 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | #endif /* !Py_INTERNAL_UCNHASH_H */ 35 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_unionobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_UNIONOBJECT_H 2 | #define Py_INTERNAL_UNIONOBJECT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | extern PyTypeObject _PyUnion_Type; 12 | #define _PyUnion_Check(op) Py_IS_TYPE((op), &_PyUnion_Type) 13 | extern PyObject *_Py_union_type_or(PyObject *, PyObject *); 14 | 15 | #define _PyGenericAlias_Check(op) PyObject_TypeCheck((op), &Py_GenericAliasType) 16 | extern PyObject *_Py_subs_parameters(PyObject *, PyObject *, PyObject *, PyObject *); 17 | extern PyObject *_Py_make_parameters(PyObject *); 18 | extern PyObject *_Py_union_args(PyObject *self); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | #endif /* !Py_INTERNAL_UNIONOBJECT_H */ 24 | -------------------------------------------------------------------------------- /python/3.12/include/internal/pycore_warnings.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_WARNINGS_H 2 | #define Py_INTERNAL_WARNINGS_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | struct _warnings_runtime_state { 12 | /* Both 'filters' and 'onceregistry' can be set in warnings.py; 13 | get_warnings_attr() will reset these variables accordingly. */ 14 | PyObject *filters; /* List */ 15 | PyObject *once_registry; /* Dict */ 16 | PyObject *default_action; /* String */ 17 | long filters_version; 18 | }; 19 | 20 | extern int _PyWarnings_InitState(PyInterpreterState *interp); 21 | 22 | PyAPI_FUNC(PyObject*) _PyWarnings_Init(void); 23 | 24 | extern void _PyErr_WarnUnawaitedCoroutine(PyObject *coro); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | #endif /* !Py_INTERNAL_WARNINGS_H */ 30 | -------------------------------------------------------------------------------- /python/3.12/include/interpreteridobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERPRETERIDOBJECT_H 2 | #define Py_INTERPRETERIDOBJECT_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #ifndef Py_LIMITED_API 9 | # define Py_CPYTHON_INTERPRETERIDOBJECT_H 10 | # include "cpython/interpreteridobject.h" 11 | # undef Py_CPYTHON_INTERPRETERIDOBJECT_H 12 | #endif 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | #endif /* !Py_INTERPRETERIDOBJECT_H */ 18 | -------------------------------------------------------------------------------- /python/3.12/include/intrcheck.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTRCHECK_H 2 | #define Py_INTRCHECK_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | PyAPI_FUNC(int) PyOS_InterruptOccurred(void); 8 | #ifdef HAVE_FORK 9 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000 10 | PyAPI_FUNC(void) PyOS_BeforeFork(void); 11 | PyAPI_FUNC(void) PyOS_AfterFork_Parent(void); 12 | PyAPI_FUNC(void) PyOS_AfterFork_Child(void); 13 | #endif 14 | #endif 15 | /* Deprecated, please use PyOS_AfterFork_Child() instead */ 16 | Py_DEPRECATED(3.7) PyAPI_FUNC(void) PyOS_AfterFork(void); 17 | 18 | #ifndef Py_LIMITED_API 19 | PyAPI_FUNC(int) _PyOS_IsMainThread(void); 20 | 21 | #ifdef MS_WINDOWS 22 | /* windows.h is not included by Python.h so use void* instead of HANDLE */ 23 | PyAPI_FUNC(void*) _PyOS_SigintEvent(void); 24 | #endif 25 | #endif /* !Py_LIMITED_API */ 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif /* !Py_INTRCHECK_H */ 31 | -------------------------------------------------------------------------------- /python/3.12/include/iterobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_ITEROBJECT_H 2 | #define Py_ITEROBJECT_H 3 | /* Iterators (the basic kind, over a sequence) */ 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_DATA(PyTypeObject) PySeqIter_Type; 9 | PyAPI_DATA(PyTypeObject) PyCallIter_Type; 10 | #ifdef Py_BUILD_CORE 11 | extern PyTypeObject _PyAnextAwaitable_Type; 12 | #endif 13 | 14 | #define PySeqIter_Check(op) Py_IS_TYPE((op), &PySeqIter_Type) 15 | 16 | PyAPI_FUNC(PyObject *) PySeqIter_New(PyObject *); 17 | 18 | 19 | #define PyCallIter_Check(op) Py_IS_TYPE((op), &PyCallIter_Type) 20 | 21 | PyAPI_FUNC(PyObject *) PyCallIter_New(PyObject *, PyObject *); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_ITEROBJECT_H */ 27 | 28 | -------------------------------------------------------------------------------- /python/3.12/include/marshal.h: -------------------------------------------------------------------------------- 1 | 2 | /* Interface for marshal.c */ 3 | 4 | #ifndef Py_MARSHAL_H 5 | #define Py_MARSHAL_H 6 | #ifndef Py_LIMITED_API 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromString(const char *, 13 | Py_ssize_t); 14 | PyAPI_FUNC(PyObject *) PyMarshal_WriteObjectToString(PyObject *, int); 15 | 16 | #define Py_MARSHAL_VERSION 4 17 | 18 | PyAPI_FUNC(long) PyMarshal_ReadLongFromFile(FILE *); 19 | PyAPI_FUNC(int) PyMarshal_ReadShortFromFile(FILE *); 20 | PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromFile(FILE *); 21 | PyAPI_FUNC(PyObject *) PyMarshal_ReadLastObjectFromFile(FILE *); 22 | 23 | PyAPI_FUNC(void) PyMarshal_WriteLongToFile(long, FILE *, int); 24 | PyAPI_FUNC(void) PyMarshal_WriteObjectToFile(PyObject *, FILE *, int); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif /* Py_LIMITED_API */ 31 | #endif /* !Py_MARSHAL_H */ 32 | -------------------------------------------------------------------------------- /python/3.12/include/memoryobject.h: -------------------------------------------------------------------------------- 1 | /* Memory view object. In Python this is available as "memoryview". */ 2 | 3 | #ifndef Py_MEMORYOBJECT_H 4 | #define Py_MEMORYOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | PyAPI_DATA(PyTypeObject) PyMemoryView_Type; 10 | 11 | #define PyMemoryView_Check(op) Py_IS_TYPE((op), &PyMemoryView_Type) 12 | 13 | PyAPI_FUNC(PyObject *) PyMemoryView_FromObject(PyObject *base); 14 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000 15 | PyAPI_FUNC(PyObject *) PyMemoryView_FromMemory(char *mem, Py_ssize_t size, 16 | int flags); 17 | #endif 18 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030b0000 19 | PyAPI_FUNC(PyObject *) PyMemoryView_FromBuffer(const Py_buffer *info); 20 | #endif 21 | PyAPI_FUNC(PyObject *) PyMemoryView_GetContiguous(PyObject *base, 22 | int buffertype, 23 | char order); 24 | 25 | #ifndef Py_LIMITED_API 26 | # define Py_CPYTHON_MEMORYOBJECT_H 27 | # include "cpython/memoryobject.h" 28 | # undef Py_CPYTHON_MEMORYOBJECT_H 29 | #endif 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | #endif /* !Py_MEMORYOBJECT_H */ 35 | -------------------------------------------------------------------------------- /python/3.12/include/osdefs.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_OSDEFS_H 2 | #define Py_OSDEFS_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | 8 | /* Operating system dependencies */ 9 | 10 | #ifdef MS_WINDOWS 11 | #define SEP L'\\' 12 | #define ALTSEP L'/' 13 | #define MAXPATHLEN 256 14 | #define DELIM L';' 15 | #endif 16 | 17 | #ifdef __VXWORKS__ 18 | #define DELIM L';' 19 | #endif 20 | 21 | /* Filename separator */ 22 | #ifndef SEP 23 | #define SEP L'/' 24 | #endif 25 | 26 | /* Max pathname length */ 27 | #ifdef __hpux 28 | #include 29 | #include 30 | #ifndef PATH_MAX 31 | #define PATH_MAX MAXPATHLEN 32 | #endif 33 | #endif 34 | 35 | #ifndef MAXPATHLEN 36 | #if defined(PATH_MAX) && PATH_MAX > 1024 37 | #define MAXPATHLEN PATH_MAX 38 | #else 39 | #define MAXPATHLEN 1024 40 | #endif 41 | #endif 42 | 43 | /* Search path entry delimiter */ 44 | #ifndef DELIM 45 | #define DELIM L':' 46 | #endif 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | #endif /* !Py_OSDEFS_H */ 52 | -------------------------------------------------------------------------------- /python/3.12/include/osmodule.h: -------------------------------------------------------------------------------- 1 | 2 | /* os module interface */ 3 | 4 | #ifndef Py_OSMODULE_H 5 | #define Py_OSMODULE_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000 11 | PyAPI_FUNC(PyObject *) PyOS_FSPath(PyObject *path); 12 | #endif 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | #endif /* !Py_OSMODULE_H */ 18 | -------------------------------------------------------------------------------- /python/3.12/include/pyframe.h: -------------------------------------------------------------------------------- 1 | /* Limited C API of PyFrame API 2 | * 3 | * Include "frameobject.h" to get the PyFrameObject structure. 4 | */ 5 | 6 | #ifndef Py_PYFRAME_H 7 | #define Py_PYFRAME_H 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | /* Return the line of code the frame is currently executing. */ 13 | PyAPI_FUNC(int) PyFrame_GetLineNumber(PyFrameObject *); 14 | 15 | PyAPI_FUNC(PyCodeObject *) PyFrame_GetCode(PyFrameObject *frame); 16 | 17 | #ifndef Py_LIMITED_API 18 | # define Py_CPYTHON_PYFRAME_H 19 | # include "cpython/pyframe.h" 20 | # undef Py_CPYTHON_PYFRAME_H 21 | #endif 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_PYFRAME_H */ 27 | -------------------------------------------------------------------------------- /python/3.12/include/pystrcmp.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_STRCMP_H 2 | #define Py_STRCMP_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_FUNC(int) PyOS_mystrnicmp(const char *, const char *, Py_ssize_t); 9 | PyAPI_FUNC(int) PyOS_mystricmp(const char *, const char *); 10 | 11 | #ifdef MS_WINDOWS 12 | #define PyOS_strnicmp strnicmp 13 | #define PyOS_stricmp stricmp 14 | #else 15 | #define PyOS_strnicmp PyOS_mystrnicmp 16 | #define PyOS_stricmp PyOS_mystricmp 17 | #endif 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif /* !Py_STRCMP_H */ 24 | -------------------------------------------------------------------------------- /python/3.12/include/pytypedefs.h: -------------------------------------------------------------------------------- 1 | // Forward declarations of types of the Python C API. 2 | // Declare them at the same place since redefining typedef is a C11 feature. 3 | // Only use a forward declaration if there is an interdependency between two 4 | // header files. 5 | 6 | #ifndef Py_PYTYPEDEFS_H 7 | #define Py_PYTYPEDEFS_H 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | typedef struct PyModuleDef PyModuleDef; 13 | typedef struct PyModuleDef_Slot PyModuleDef_Slot; 14 | typedef struct PyMethodDef PyMethodDef; 15 | typedef struct PyGetSetDef PyGetSetDef; 16 | typedef struct PyMemberDef PyMemberDef; 17 | 18 | typedef struct _object PyObject; 19 | typedef struct _longobject PyLongObject; 20 | typedef struct _typeobject PyTypeObject; 21 | typedef struct PyCodeObject PyCodeObject; 22 | typedef struct _frame PyFrameObject; 23 | 24 | typedef struct _ts PyThreadState; 25 | typedef struct _is PyInterpreterState; 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif // !Py_PYTYPEDEFS_H 31 | -------------------------------------------------------------------------------- /python/3.12/include/rangeobject.h: -------------------------------------------------------------------------------- 1 | 2 | /* Range object interface */ 3 | 4 | #ifndef Py_RANGEOBJECT_H 5 | #define Py_RANGEOBJECT_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | /* 11 | A range object represents an integer range. This is an immutable object; 12 | a range cannot change its value after creation. 13 | 14 | Range objects behave like the corresponding tuple objects except that 15 | they are represented by a start, stop, and step datamembers. 16 | */ 17 | 18 | PyAPI_DATA(PyTypeObject) PyRange_Type; 19 | PyAPI_DATA(PyTypeObject) PyRangeIter_Type; 20 | PyAPI_DATA(PyTypeObject) PyLongRangeIter_Type; 21 | 22 | #define PyRange_Check(op) Py_IS_TYPE((op), &PyRange_Type) 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | #endif /* !Py_RANGEOBJECT_H */ 28 | -------------------------------------------------------------------------------- /python/3.12/include/traceback.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_TRACEBACK_H 2 | #define Py_TRACEBACK_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | /* Traceback interface */ 8 | 9 | PyAPI_FUNC(int) PyTraceBack_Here(PyFrameObject *); 10 | PyAPI_FUNC(int) PyTraceBack_Print(PyObject *, PyObject *); 11 | 12 | /* Reveal traceback type so we can typecheck traceback objects */ 13 | PyAPI_DATA(PyTypeObject) PyTraceBack_Type; 14 | #define PyTraceBack_Check(v) Py_IS_TYPE((v), &PyTraceBack_Type) 15 | 16 | 17 | #ifndef Py_LIMITED_API 18 | # define Py_CPYTHON_TRACEBACK_H 19 | # include "cpython/traceback.h" 20 | # undef Py_CPYTHON_TRACEBACK_H 21 | #endif 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_TRACEBACK_H */ 27 | -------------------------------------------------------------------------------- /python/3.12/include/warnings.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_WARNINGS_H 2 | #define Py_WARNINGS_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | PyAPI_FUNC(int) PyErr_WarnEx( 8 | PyObject *category, 9 | const char *message, /* UTF-8 encoded string */ 10 | Py_ssize_t stack_level); 11 | 12 | PyAPI_FUNC(int) PyErr_WarnFormat( 13 | PyObject *category, 14 | Py_ssize_t stack_level, 15 | const char *format, /* ASCII-encoded string */ 16 | ...); 17 | 18 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000 19 | /* Emit a ResourceWarning warning */ 20 | PyAPI_FUNC(int) PyErr_ResourceWarning( 21 | PyObject *source, 22 | Py_ssize_t stack_level, 23 | const char *format, /* ASCII-encoded string */ 24 | ...); 25 | #endif 26 | 27 | PyAPI_FUNC(int) PyErr_WarnExplicit( 28 | PyObject *category, 29 | const char *message, /* UTF-8 encoded string */ 30 | const char *filename, /* decoded from the filesystem encoding */ 31 | int lineno, 32 | const char *module, /* UTF-8 encoded string */ 33 | PyObject *registry); 34 | 35 | #ifndef Py_LIMITED_API 36 | # define Py_CPYTHON_WARNINGS_H 37 | # include "cpython/warnings.h" 38 | # undef Py_CPYTHON_WARNINGS_H 39 | #endif 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | #endif /* !Py_WARNINGS_H */ 45 | 46 | -------------------------------------------------------------------------------- /python/3.12/lib/python3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flexsim/FlexSimPy/79b0aed7b3e677ceb41754df2dba8cdb4a001a78/python/3.12/lib/python3.lib -------------------------------------------------------------------------------- /python/3.12/lib/python312.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flexsim/FlexSimPy/79b0aed7b3e677ceb41754df2dba8cdb4a001a78/python/3.12/lib/python312.lib -------------------------------------------------------------------------------- /python/3.9/include/ast.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_LIMITED_API 2 | #ifndef Py_AST_H 3 | #define Py_AST_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include "Python-ast.h" /* mod_ty */ 9 | #include "node.h" /* node */ 10 | 11 | PyAPI_FUNC(int) PyAST_Validate(mod_ty); 12 | PyAPI_FUNC(mod_ty) PyAST_FromNode( 13 | const node *n, 14 | PyCompilerFlags *flags, 15 | const char *filename, /* decoded from the filesystem encoding */ 16 | PyArena *arena); 17 | PyAPI_FUNC(mod_ty) PyAST_FromNodeObject( 18 | const node *n, 19 | PyCompilerFlags *flags, 20 | PyObject *filename, 21 | PyArena *arena); 22 | 23 | /* _PyAST_ExprAsUnicode is defined in ast_unparse.c */ 24 | PyAPI_FUNC(PyObject *) _PyAST_ExprAsUnicode(expr_ty); 25 | 26 | /* Return the borrowed reference to the first literal string in the 27 | sequence of statements or NULL if it doesn't start from a literal string. 28 | Doesn't set exception. */ 29 | PyAPI_FUNC(PyObject *) _PyAST_GetDocString(asdl_seq *); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | #endif /* !Py_AST_H */ 35 | #endif /* !Py_LIMITED_API */ 36 | -------------------------------------------------------------------------------- /python/3.9/include/bitset.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef Py_BITSET_H 3 | #define Py_BITSET_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | /* Bitset interface */ 9 | 10 | #define BYTE char 11 | typedef BYTE *bitset; 12 | 13 | #define testbit(ss, ibit) (((ss)[BIT2BYTE(ibit)] & BIT2MASK(ibit)) != 0) 14 | 15 | #define BITSPERBYTE (8*sizeof(BYTE)) 16 | #define BIT2BYTE(ibit) ((ibit) / BITSPERBYTE) 17 | #define BIT2SHIFT(ibit) ((ibit) % BITSPERBYTE) 18 | #define BIT2MASK(ibit) (1 << BIT2SHIFT(ibit)) 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | #endif /* !Py_BITSET_H */ 24 | -------------------------------------------------------------------------------- /python/3.9/include/bltinmodule.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_BLTINMODULE_H 2 | #define Py_BLTINMODULE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | PyAPI_DATA(PyTypeObject) PyFilter_Type; 8 | PyAPI_DATA(PyTypeObject) PyMap_Type; 9 | PyAPI_DATA(PyTypeObject) PyZip_Type; 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif /* !Py_BLTINMODULE_H */ 15 | -------------------------------------------------------------------------------- /python/3.9/include/boolobject.h: -------------------------------------------------------------------------------- 1 | /* Boolean object interface */ 2 | 3 | #ifndef Py_BOOLOBJECT_H 4 | #define Py_BOOLOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | 10 | PyAPI_DATA(PyTypeObject) PyBool_Type; 11 | 12 | #define PyBool_Check(x) Py_IS_TYPE(x, &PyBool_Type) 13 | 14 | /* Py_False and Py_True are the only two bools in existence. 15 | Don't forget to apply Py_INCREF() when returning either!!! */ 16 | 17 | /* Don't use these directly */ 18 | PyAPI_DATA(struct _longobject) _Py_FalseStruct, _Py_TrueStruct; 19 | 20 | /* Use these macros */ 21 | #define Py_False ((PyObject *) &_Py_FalseStruct) 22 | #define Py_True ((PyObject *) &_Py_TrueStruct) 23 | 24 | /* Macros for returning Py_True or Py_False, respectively */ 25 | #define Py_RETURN_TRUE return Py_INCREF(Py_True), Py_True 26 | #define Py_RETURN_FALSE return Py_INCREF(Py_False), Py_False 27 | 28 | /* Function to return a bool from a C long */ 29 | PyAPI_FUNC(PyObject *) PyBool_FromLong(long); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | #endif /* !Py_BOOLOBJECT_H */ 35 | -------------------------------------------------------------------------------- /python/3.9/include/cellobject.h: -------------------------------------------------------------------------------- 1 | /* Cell object interface */ 2 | #ifndef Py_LIMITED_API 3 | #ifndef Py_CELLOBJECT_H 4 | #define Py_CELLOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | typedef struct { 10 | PyObject_HEAD 11 | PyObject *ob_ref; /* Content of the cell or NULL when empty */ 12 | } PyCellObject; 13 | 14 | PyAPI_DATA(PyTypeObject) PyCell_Type; 15 | 16 | #define PyCell_Check(op) Py_IS_TYPE(op, &PyCell_Type) 17 | 18 | PyAPI_FUNC(PyObject *) PyCell_New(PyObject *); 19 | PyAPI_FUNC(PyObject *) PyCell_Get(PyObject *); 20 | PyAPI_FUNC(int) PyCell_Set(PyObject *, PyObject *); 21 | 22 | #define PyCell_GET(op) (((PyCellObject *)(op))->ob_ref) 23 | #define PyCell_SET(op, v) (((PyCellObject *)(op))->ob_ref = v) 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | #endif /* !Py_TUPLEOBJECT_H */ 29 | #endif /* Py_LIMITED_API */ 30 | -------------------------------------------------------------------------------- /python/3.9/include/code.h: -------------------------------------------------------------------------------- 1 | /* Definitions for bytecode */ 2 | 3 | #ifndef Py_CODE_H 4 | #define Py_CODE_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | typedef struct PyCodeObject PyCodeObject; 10 | 11 | #ifndef Py_LIMITED_API 12 | # define Py_CPYTHON_CODE_H 13 | # include "cpython/code.h" 14 | # undef Py_CPYTHON_CODE_H 15 | #endif 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif /* !Py_CODE_H */ 21 | -------------------------------------------------------------------------------- /python/3.9/include/cpython/bytearrayobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_BYTEARRAYOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | /* Object layout */ 6 | typedef struct { 7 | PyObject_VAR_HEAD 8 | Py_ssize_t ob_alloc; /* How many bytes allocated in ob_bytes */ 9 | char *ob_bytes; /* Physical backing buffer */ 10 | char *ob_start; /* Logical start inside ob_bytes */ 11 | Py_ssize_t ob_exports; /* How many buffer exports */ 12 | } PyByteArrayObject; 13 | 14 | /* Macros, trading safety for speed */ 15 | #define PyByteArray_AS_STRING(self) \ 16 | (assert(PyByteArray_Check(self)), \ 17 | Py_SIZE(self) ? ((PyByteArrayObject *)(self))->ob_start : _PyByteArray_empty_string) 18 | #define PyByteArray_GET_SIZE(self) (assert(PyByteArray_Check(self)), Py_SIZE(self)) 19 | 20 | PyAPI_DATA(char) _PyByteArray_empty_string[]; 21 | -------------------------------------------------------------------------------- /python/3.9/include/cpython/fileobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_FILEOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | PyAPI_FUNC(char *) Py_UniversalNewlineFgets(char *, int, FILE*, PyObject *); 10 | 11 | /* The std printer acts as a preliminary sys.stderr until the new io 12 | infrastructure is in place. */ 13 | PyAPI_FUNC(PyObject *) PyFile_NewStdPrinter(int); 14 | PyAPI_DATA(PyTypeObject) PyStdPrinter_Type; 15 | 16 | typedef PyObject * (*Py_OpenCodeHookFunction)(PyObject *, void *); 17 | 18 | PyAPI_FUNC(PyObject *) PyFile_OpenCode(const char *utf8path); 19 | PyAPI_FUNC(PyObject *) PyFile_OpenCodeObject(PyObject *path); 20 | PyAPI_FUNC(int) PyFile_SetOpenCodeHook(Py_OpenCodeHookFunction hook, void *userData); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | -------------------------------------------------------------------------------- /python/3.9/include/cpython/interpreteridobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_INTERPRETERIDOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | /* Interpreter ID Object */ 10 | 11 | PyAPI_DATA(PyTypeObject) _PyInterpreterID_Type; 12 | 13 | PyAPI_FUNC(PyObject *) _PyInterpreterID_New(int64_t); 14 | PyAPI_FUNC(PyObject *) _PyInterpreterState_GetIDObject(PyInterpreterState *); 15 | PyAPI_FUNC(PyInterpreterState *) _PyInterpreterID_LookUp(PyObject *); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /python/3.9/include/cpython/sysmodule.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_SYSMODULE_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | PyAPI_FUNC(PyObject *) _PySys_GetObjectId(_Py_Identifier *key); 10 | PyAPI_FUNC(int) _PySys_SetObjectId(_Py_Identifier *key, PyObject *); 11 | 12 | PyAPI_FUNC(size_t) _PySys_GetSizeOf(PyObject *); 13 | 14 | typedef int(*Py_AuditHookFunction)(const char *, PyObject *, void *); 15 | 16 | PyAPI_FUNC(int) PySys_Audit( 17 | const char *event, 18 | const char *argFormat, 19 | ...); 20 | PyAPI_FUNC(int) PySys_AddAuditHook(Py_AuditHookFunction, void*); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | -------------------------------------------------------------------------------- /python/3.9/include/cpython/traceback.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_TRACEBACK_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | typedef struct _traceback { 10 | PyObject_HEAD 11 | struct _traceback *tb_next; 12 | PyFrameObject *tb_frame; 13 | int tb_lasti; 14 | int tb_lineno; 15 | } PyTracebackObject; 16 | 17 | PyAPI_FUNC(int) _Py_DisplaySourceLine(PyObject *, PyObject *, int, int); 18 | PyAPI_FUNC(void) _PyTraceback_Add(const char *, const char *, int); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | -------------------------------------------------------------------------------- /python/3.9/include/cpython/tupleobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_TUPLEOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | typedef struct { 10 | PyObject_VAR_HEAD 11 | /* ob_item contains space for 'ob_size' elements. 12 | Items must normally not be NULL, except during construction when 13 | the tuple is not yet visible outside the function that builds it. */ 14 | PyObject *ob_item[1]; 15 | } PyTupleObject; 16 | 17 | PyAPI_FUNC(int) _PyTuple_Resize(PyObject **, Py_ssize_t); 18 | PyAPI_FUNC(void) _PyTuple_MaybeUntrack(PyObject *); 19 | 20 | /* Macros trading safety for speed */ 21 | 22 | /* Cast argument to PyTupleObject* type. */ 23 | #define _PyTuple_CAST(op) (assert(PyTuple_Check(op)), (PyTupleObject *)(op)) 24 | 25 | #define PyTuple_GET_SIZE(op) Py_SIZE(_PyTuple_CAST(op)) 26 | 27 | #define PyTuple_GET_ITEM(op, i) (_PyTuple_CAST(op)->ob_item[i]) 28 | 29 | /* Macro, *only* to be used to fill in brand new tuples */ 30 | #define PyTuple_SET_ITEM(op, i, v) (_PyTuple_CAST(op)->ob_item[i] = v) 31 | 32 | PyAPI_FUNC(void) _PyTuple_DebugMallocStats(FILE *out); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | -------------------------------------------------------------------------------- /python/3.9/include/enumobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_ENUMOBJECT_H 2 | #define Py_ENUMOBJECT_H 3 | 4 | /* Enumerate Object */ 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | PyAPI_DATA(PyTypeObject) PyEnum_Type; 11 | PyAPI_DATA(PyTypeObject) PyReversed_Type; 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | #endif /* !Py_ENUMOBJECT_H */ 18 | -------------------------------------------------------------------------------- /python/3.9/include/eval.h: -------------------------------------------------------------------------------- 1 | 2 | /* Interface to execute compiled code */ 3 | 4 | #ifndef Py_EVAL_H 5 | #define Py_EVAL_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | PyAPI_FUNC(PyObject *) PyEval_EvalCode(PyObject *, PyObject *, PyObject *); 11 | 12 | PyAPI_FUNC(PyObject *) PyEval_EvalCodeEx(PyObject *co, 13 | PyObject *globals, 14 | PyObject *locals, 15 | PyObject *const *args, int argc, 16 | PyObject *const *kwds, int kwdc, 17 | PyObject *const *defs, int defc, 18 | PyObject *kwdefs, PyObject *closure); 19 | 20 | #ifndef Py_LIMITED_API 21 | PyAPI_FUNC(PyObject *) _PyEval_EvalCodeWithName( 22 | PyObject *co, 23 | PyObject *globals, PyObject *locals, 24 | PyObject *const *args, Py_ssize_t argcount, 25 | PyObject *const *kwnames, PyObject *const *kwargs, 26 | Py_ssize_t kwcount, int kwstep, 27 | PyObject *const *defs, Py_ssize_t defcount, 28 | PyObject *kwdefs, PyObject *closure, 29 | PyObject *name, PyObject *qualname); 30 | 31 | PyAPI_FUNC(PyObject *) _PyEval_CallTracing(PyObject *func, PyObject *args); 32 | #endif 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | #endif /* !Py_EVAL_H */ 38 | -------------------------------------------------------------------------------- /python/3.9/include/exports.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_EXPORTS_H 2 | #define Py_EXPORTS_H 3 | 4 | #if defined(_WIN32) || defined(__CYGWIN__) 5 | #define Py_IMPORTED_SYMBOL __declspec(dllimport) 6 | #define Py_EXPORTED_SYMBOL __declspec(dllexport) 7 | #define Py_LOCAL_SYMBOL 8 | #else 9 | /* 10 | * If we only ever used gcc >= 5, we could use __has_attribute(visibility) 11 | * as a cross-platform way to determine if visibility is supported. However, 12 | * we may still need to support gcc >= 4, as some Ubuntu LTS and Centos versions 13 | * have 4 < gcc < 5. 14 | */ 15 | #ifndef __has_attribute 16 | #define __has_attribute(x) 0 // Compatibility with non-clang compilers. 17 | #endif 18 | #if (defined(__GNUC__) && (__GNUC__ >= 4)) ||\ 19 | (defined(__clang__) && __has_attribute(visibility)) 20 | #define Py_IMPORTED_SYMBOL __attribute__ ((visibility ("default"))) 21 | #define Py_EXPORTED_SYMBOL __attribute__ ((visibility ("default"))) 22 | #define Py_LOCAL_SYMBOL __attribute__ ((visibility ("hidden"))) 23 | #else 24 | #define Py_IMPORTED_SYMBOL 25 | #define Py_EXPORTED_SYMBOL 26 | #define Py_LOCAL_SYMBOL 27 | #endif 28 | #endif 29 | 30 | #endif /* Py_EXPORTS_H */ 31 | -------------------------------------------------------------------------------- /python/3.9/include/fileutils.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_FILEUTILS_H 2 | #define Py_FILEUTILS_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000 8 | PyAPI_FUNC(wchar_t *) Py_DecodeLocale( 9 | const char *arg, 10 | size_t *size); 11 | 12 | PyAPI_FUNC(char*) Py_EncodeLocale( 13 | const wchar_t *text, 14 | size_t *error_pos); 15 | 16 | PyAPI_FUNC(char*) _Py_EncodeLocaleRaw( 17 | const wchar_t *text, 18 | size_t *error_pos); 19 | #endif 20 | 21 | #ifndef Py_LIMITED_API 22 | # define Py_CPYTHON_FILEUTILS_H 23 | # include "cpython/fileutils.h" 24 | # undef Py_CPYTHON_FILEUTILS_H 25 | #endif 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif /* !Py_FILEUTILS_H */ 31 | -------------------------------------------------------------------------------- /python/3.9/include/frameobject.h: -------------------------------------------------------------------------------- 1 | /* Frame object interface */ 2 | 3 | #ifndef Py_FRAMEOBJECT_H 4 | #define Py_FRAMEOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #include "pyframe.h" 10 | 11 | #ifndef Py_LIMITED_API 12 | # define Py_CPYTHON_FRAMEOBJECT_H 13 | # include "cpython/frameobject.h" 14 | # undef Py_CPYTHON_FRAMEOBJECT_H 15 | #endif 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif /* !Py_FRAMEOBJECT_H */ 21 | -------------------------------------------------------------------------------- /python/3.9/include/genericaliasobject.h: -------------------------------------------------------------------------------- 1 | // Implementation of PEP 585: support list[int] etc. 2 | #ifndef Py_GENERICALIASOBJECT_H 3 | #define Py_GENERICALIASOBJECT_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_FUNC(PyObject *) Py_GenericAlias(PyObject *, PyObject *); 9 | PyAPI_DATA(PyTypeObject) Py_GenericAliasType; 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif /* !Py_GENERICALIASOBJECT_H */ 15 | -------------------------------------------------------------------------------- /python/3.9/include/internal/pegen_interface.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_PEGENINTERFACE 2 | #define Py_PEGENINTERFACE 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | #include "Python.h" 12 | #include "Python-ast.h" 13 | 14 | PyAPI_FUNC(mod_ty) PyPegen_ASTFromString( 15 | const char *str, 16 | const char *filename, 17 | int mode, 18 | PyCompilerFlags *flags, 19 | PyArena *arena); 20 | PyAPI_FUNC(mod_ty) PyPegen_ASTFromStringObject( 21 | const char *str, 22 | PyObject* filename, 23 | int mode, 24 | PyCompilerFlags *flags, 25 | PyArena *arena); 26 | PyAPI_FUNC(mod_ty) PyPegen_ASTFromFileObject( 27 | FILE *fp, 28 | PyObject *filename_ob, 29 | int mode, 30 | const char *enc, 31 | const char *ps1, 32 | const char *ps2, 33 | PyCompilerFlags *flags, 34 | int *errcode, 35 | PyArena *arena); 36 | PyAPI_FUNC(mod_ty) PyPegen_ASTFromFilename( 37 | const char *filename, 38 | int mode, 39 | PyCompilerFlags *flags, 40 | PyArena *arena); 41 | 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | #endif /* !Py_PEGENINTERFACE*/ 47 | -------------------------------------------------------------------------------- /python/3.9/include/internal/pycore_abstract.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_ABSTRACT_H 2 | #define Py_INTERNAL_ABSTRACT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | // Fast inlined version of PyIndex_Check() 12 | static inline int 13 | _PyIndex_Check(PyObject *obj) 14 | { 15 | PyNumberMethods *tp_as_number = Py_TYPE(obj)->tp_as_number; 16 | return (tp_as_number != NULL && tp_as_number->nb_index != NULL); 17 | } 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif /* !Py_INTERNAL_ABSTRACT_H */ 23 | -------------------------------------------------------------------------------- /python/3.9/include/internal/pycore_accu.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_LIMITED_API 2 | #ifndef Py_INTERNAL_ACCU_H 3 | #define Py_INTERNAL_ACCU_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | /*** This is a private API for use by the interpreter and the stdlib. 9 | *** Its definition may be changed or removed at any moment. 10 | ***/ 11 | 12 | #ifndef Py_BUILD_CORE 13 | # error "this header requires Py_BUILD_CORE define" 14 | #endif 15 | 16 | /* 17 | * A two-level accumulator of unicode objects that avoids both the overhead 18 | * of keeping a huge number of small separate objects, and the quadratic 19 | * behaviour of using a naive repeated concatenation scheme. 20 | */ 21 | 22 | #undef small /* defined by some Windows headers */ 23 | 24 | typedef struct { 25 | PyObject *large; /* A list of previously accumulated large strings */ 26 | PyObject *small; /* Pending small strings */ 27 | } _PyAccu; 28 | 29 | PyAPI_FUNC(int) _PyAccu_Init(_PyAccu *acc); 30 | PyAPI_FUNC(int) _PyAccu_Accumulate(_PyAccu *acc, PyObject *unicode); 31 | PyAPI_FUNC(PyObject *) _PyAccu_FinishAsList(_PyAccu *acc); 32 | PyAPI_FUNC(PyObject *) _PyAccu_Finish(_PyAccu *acc); 33 | PyAPI_FUNC(void) _PyAccu_Destroy(_PyAccu *acc); 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | #endif /* !Py_INTERNAL_ACCU_H */ 39 | #endif /* !Py_LIMITED_API */ 40 | -------------------------------------------------------------------------------- /python/3.9/include/internal/pycore_call.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_CALL_H 2 | #define Py_INTERNAL_CALL_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | PyAPI_FUNC(PyObject *) _PyObject_Call_Prepend( 12 | PyThreadState *tstate, 13 | PyObject *callable, 14 | PyObject *obj, 15 | PyObject *args, 16 | PyObject *kwargs); 17 | 18 | PyAPI_FUNC(PyObject *) _PyObject_FastCallDictTstate( 19 | PyThreadState *tstate, 20 | PyObject *callable, 21 | PyObject *const *args, 22 | size_t nargsf, 23 | PyObject *kwargs); 24 | 25 | PyAPI_FUNC(PyObject *) _PyObject_Call( 26 | PyThreadState *tstate, 27 | PyObject *callable, 28 | PyObject *args, 29 | PyObject *kwargs); 30 | 31 | static inline PyObject * 32 | _PyObject_CallNoArgTstate(PyThreadState *tstate, PyObject *func) { 33 | return _PyObject_VectorcallTstate(tstate, func, NULL, 0, NULL); 34 | } 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | #endif /* !Py_INTERNAL_CALL_H */ 40 | -------------------------------------------------------------------------------- /python/3.9/include/internal/pycore_code.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_CODE_H 2 | #define Py_INTERNAL_CODE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | typedef struct { 8 | PyObject *ptr; /* Cached pointer (borrowed reference) */ 9 | uint64_t globals_ver; /* ma_version of global dict */ 10 | uint64_t builtins_ver; /* ma_version of builtin dict */ 11 | } _PyOpcache_LoadGlobal; 12 | 13 | struct _PyOpcache { 14 | union { 15 | _PyOpcache_LoadGlobal lg; 16 | } u; 17 | char optimized; 18 | }; 19 | 20 | /* Private API */ 21 | int _PyCode_InitOpcache(PyCodeObject *co); 22 | 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | #endif /* !Py_INTERNAL_CODE_H */ 28 | -------------------------------------------------------------------------------- /python/3.9/include/internal/pycore_context.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_CONTEXT_H 2 | #define Py_INTERNAL_CONTEXT_H 3 | 4 | #ifndef Py_BUILD_CORE 5 | # error "this header requires Py_BUILD_CORE define" 6 | #endif 7 | 8 | #include "pycore_hamt.h" /* PyHamtObject */ 9 | 10 | struct _pycontextobject { 11 | PyObject_HEAD 12 | PyContext *ctx_prev; 13 | PyHamtObject *ctx_vars; 14 | PyObject *ctx_weakreflist; 15 | int ctx_entered; 16 | }; 17 | 18 | 19 | struct _pycontextvarobject { 20 | PyObject_HEAD 21 | PyObject *var_name; 22 | PyObject *var_default; 23 | PyObject *var_cached; 24 | uint64_t var_cached_tsid; 25 | uint64_t var_cached_tsver; 26 | Py_hash_t var_hash; 27 | }; 28 | 29 | 30 | struct _pycontexttokenobject { 31 | PyObject_HEAD 32 | PyContext *tok_ctx; 33 | PyContextVar *tok_var; 34 | PyObject *tok_oldval; 35 | int tok_used; 36 | }; 37 | 38 | 39 | int _PyContext_Init(void); 40 | void _PyContext_Fini(void); 41 | 42 | #endif /* !Py_INTERNAL_CONTEXT_H */ 43 | -------------------------------------------------------------------------------- /python/3.9/include/internal/pycore_dtoa.h: -------------------------------------------------------------------------------- 1 | #ifndef PY_NO_SHORT_FLOAT_REPR 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifndef Py_BUILD_CORE 7 | # error "this header requires Py_BUILD_CORE define" 8 | #endif 9 | 10 | /* These functions are used by modules compiled as C extension like math: 11 | they must be exported. */ 12 | 13 | PyAPI_FUNC(double) _Py_dg_strtod(const char *str, char **ptr); 14 | PyAPI_FUNC(char *) _Py_dg_dtoa(double d, int mode, int ndigits, 15 | int *decpt, int *sign, char **rve); 16 | PyAPI_FUNC(void) _Py_dg_freedtoa(char *s); 17 | PyAPI_FUNC(double) _Py_dg_stdnan(int sign); 18 | PyAPI_FUNC(double) _Py_dg_infinity(int sign); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | #endif /* !PY_NO_SHORT_FLOAT_REPR */ 24 | -------------------------------------------------------------------------------- /python/3.9/include/internal/pycore_getopt.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_PYGETOPT_H 2 | #define Py_INTERNAL_PYGETOPT_H 3 | 4 | #ifndef Py_BUILD_CORE 5 | # error "this header requires Py_BUILD_CORE define" 6 | #endif 7 | 8 | extern int _PyOS_opterr; 9 | extern Py_ssize_t _PyOS_optind; 10 | extern const wchar_t *_PyOS_optarg; 11 | 12 | extern void _PyOS_ResetGetOpt(void); 13 | 14 | typedef struct { 15 | const wchar_t *name; 16 | int has_arg; 17 | int val; 18 | } _PyOS_LongOption; 19 | 20 | extern int _PyOS_GetOpt(Py_ssize_t argc, wchar_t * const *argv, int *longindex); 21 | 22 | #endif /* !Py_INTERNAL_PYGETOPT_H */ 23 | -------------------------------------------------------------------------------- /python/3.9/include/internal/pycore_import.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_LIMITED_API 2 | #ifndef Py_INTERNAL_IMPORT_H 3 | #define Py_INTERNAL_IMPORT_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_FUNC(PyObject *) _PyImport_FindBuiltin( 9 | PyThreadState *tstate, 10 | const char *name /* UTF-8 encoded string */ 11 | ); 12 | 13 | #ifdef HAVE_FORK 14 | extern void _PyImport_ReInitLock(void); 15 | #endif 16 | extern void _PyImport_Cleanup(PyThreadState *tstate); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | #endif /* !Py_INTERNAL_IMPORT_H */ 22 | #endif /* !Py_LIMITED_API */ 23 | -------------------------------------------------------------------------------- /python/3.9/include/internal/pycore_pyhash.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_HASH_H 2 | #define Py_INTERNAL_HASH_H 3 | 4 | #ifndef Py_BUILD_CORE 5 | # error "this header requires Py_BUILD_CORE define" 6 | #endif 7 | 8 | uint64_t _Py_KeyedHash(uint64_t, const char *, Py_ssize_t); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /python/3.9/include/internal/pycore_sysmodule.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_SYSMODULE_H 2 | #define Py_INTERNAL_SYSMODULE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | PyAPI_FUNC(int) _PySys_Audit( 12 | PyThreadState *tstate, 13 | const char *event, 14 | const char *argFormat, 15 | ...); 16 | 17 | /* We want minimal exposure of this function, so use extern rather than 18 | PyAPI_FUNC() to not export the symbol. */ 19 | extern void _PySys_ClearAuditHooks(PyThreadState *tstate); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | #endif /* !Py_INTERNAL_SYSMODULE_H */ 25 | -------------------------------------------------------------------------------- /python/3.9/include/internal/pycore_tupleobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_TUPLEOBJECT_H 2 | #define Py_INTERNAL_TUPLEOBJECT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | #include "tupleobject.h" /* _PyTuple_CAST() */ 12 | 13 | #define _PyTuple_ITEMS(op) (_PyTuple_CAST(op)->ob_item) 14 | PyAPI_FUNC(PyObject *) _PyTuple_FromArray(PyObject *const *, Py_ssize_t); 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | #endif /* !Py_INTERNAL_TUPLEOBJECT_H */ 20 | -------------------------------------------------------------------------------- /python/3.9/include/internal/pycore_warnings.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_WARNINGS_H 2 | #define Py_INTERNAL_WARNINGS_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef Py_BUILD_CORE 8 | # error "this header requires Py_BUILD_CORE define" 9 | #endif 10 | 11 | struct _warnings_runtime_state { 12 | /* Both 'filters' and 'onceregistry' can be set in warnings.py; 13 | get_warnings_attr() will reset these variables accordingly. */ 14 | PyObject *filters; /* List */ 15 | PyObject *once_registry; /* Dict */ 16 | PyObject *default_action; /* String */ 17 | long filters_version; 18 | }; 19 | 20 | extern PyStatus _PyWarnings_InitState(PyThreadState *tstate); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | #endif /* !Py_INTERNAL_WARNINGS_H */ 26 | -------------------------------------------------------------------------------- /python/3.9/include/interpreteridobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERPRETERIDOBJECT_H 2 | #define Py_INTERPRETERIDOBJECT_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #ifndef Py_LIMITED_API 9 | # define Py_CPYTHON_INTERPRETERIDOBJECT_H 10 | # include "cpython/interpreteridobject.h" 11 | # undef Py_CPYTHON_INTERPRETERIDOBJECT_H 12 | #endif 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | #endif /* !Py_INTERPRETERIDOBJECT_H */ 18 | -------------------------------------------------------------------------------- /python/3.9/include/intrcheck.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef Py_INTRCHECK_H 3 | #define Py_INTRCHECK_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_FUNC(int) PyOS_InterruptOccurred(void); 9 | PyAPI_FUNC(void) PyOS_InitInterrupts(void); 10 | #ifdef HAVE_FORK 11 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000 12 | PyAPI_FUNC(void) PyOS_BeforeFork(void); 13 | PyAPI_FUNC(void) PyOS_AfterFork_Parent(void); 14 | PyAPI_FUNC(void) PyOS_AfterFork_Child(void); 15 | #endif 16 | #endif 17 | /* Deprecated, please use PyOS_AfterFork_Child() instead */ 18 | Py_DEPRECATED(3.7) PyAPI_FUNC(void) PyOS_AfterFork(void); 19 | 20 | #ifndef Py_LIMITED_API 21 | PyAPI_FUNC(int) _PyOS_IsMainThread(void); 22 | PyAPI_FUNC(void) _PySignal_AfterFork(void); 23 | 24 | #ifdef MS_WINDOWS 25 | /* windows.h is not included by Python.h so use void* instead of HANDLE */ 26 | PyAPI_FUNC(void*) _PyOS_SigintEvent(void); 27 | #endif 28 | #endif /* !Py_LIMITED_API */ 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | #endif /* !Py_INTRCHECK_H */ 34 | -------------------------------------------------------------------------------- /python/3.9/include/iterobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_ITEROBJECT_H 2 | #define Py_ITEROBJECT_H 3 | /* Iterators (the basic kind, over a sequence) */ 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_DATA(PyTypeObject) PySeqIter_Type; 9 | PyAPI_DATA(PyTypeObject) PyCallIter_Type; 10 | 11 | #define PySeqIter_Check(op) Py_IS_TYPE(op, &PySeqIter_Type) 12 | 13 | PyAPI_FUNC(PyObject *) PySeqIter_New(PyObject *); 14 | 15 | 16 | #define PyCallIter_Check(op) Py_IS_TYPE(op, &PyCallIter_Type) 17 | 18 | PyAPI_FUNC(PyObject *) PyCallIter_New(PyObject *, PyObject *); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | #endif /* !Py_ITEROBJECT_H */ 24 | 25 | -------------------------------------------------------------------------------- /python/3.9/include/marshal.h: -------------------------------------------------------------------------------- 1 | 2 | /* Interface for marshal.c */ 3 | 4 | #ifndef Py_MARSHAL_H 5 | #define Py_MARSHAL_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | #define Py_MARSHAL_VERSION 4 11 | 12 | PyAPI_FUNC(void) PyMarshal_WriteLongToFile(long, FILE *, int); 13 | PyAPI_FUNC(void) PyMarshal_WriteObjectToFile(PyObject *, FILE *, int); 14 | PyAPI_FUNC(PyObject *) PyMarshal_WriteObjectToString(PyObject *, int); 15 | 16 | #ifndef Py_LIMITED_API 17 | PyAPI_FUNC(long) PyMarshal_ReadLongFromFile(FILE *); 18 | PyAPI_FUNC(int) PyMarshal_ReadShortFromFile(FILE *); 19 | PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromFile(FILE *); 20 | PyAPI_FUNC(PyObject *) PyMarshal_ReadLastObjectFromFile(FILE *); 21 | #endif 22 | PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromString(const char *, 23 | Py_ssize_t); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | #endif /* !Py_MARSHAL_H */ 29 | -------------------------------------------------------------------------------- /python/3.9/include/namespaceobject.h: -------------------------------------------------------------------------------- 1 | 2 | /* simple namespace object interface */ 3 | 4 | #ifndef NAMESPACEOBJECT_H 5 | #define NAMESPACEOBJECT_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | #ifndef Py_LIMITED_API 11 | PyAPI_DATA(PyTypeObject) _PyNamespace_Type; 12 | 13 | PyAPI_FUNC(PyObject *) _PyNamespace_New(PyObject *kwds); 14 | #endif /* !Py_LIMITED_API */ 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | #endif /* !NAMESPACEOBJECT_H */ 20 | -------------------------------------------------------------------------------- /python/3.9/include/osdefs.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_OSDEFS_H 2 | #define Py_OSDEFS_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | 8 | /* Operating system dependencies */ 9 | 10 | #ifdef MS_WINDOWS 11 | #define SEP L'\\' 12 | #define ALTSEP L'/' 13 | #define MAXPATHLEN 256 14 | #define DELIM L';' 15 | #endif 16 | 17 | #ifdef __VXWORKS__ 18 | #define DELIM L';' 19 | #endif 20 | 21 | /* Filename separator */ 22 | #ifndef SEP 23 | #define SEP L'/' 24 | #endif 25 | 26 | /* Max pathname length */ 27 | #ifdef __hpux 28 | #include 29 | #include 30 | #ifndef PATH_MAX 31 | #define PATH_MAX MAXPATHLEN 32 | #endif 33 | #endif 34 | 35 | #ifndef MAXPATHLEN 36 | #if defined(PATH_MAX) && PATH_MAX > 1024 37 | #define MAXPATHLEN PATH_MAX 38 | #else 39 | #define MAXPATHLEN 1024 40 | #endif 41 | #endif 42 | 43 | /* Search path entry delimiter */ 44 | #ifndef DELIM 45 | #define DELIM L':' 46 | #endif 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | #endif /* !Py_OSDEFS_H */ 52 | -------------------------------------------------------------------------------- /python/3.9/include/osmodule.h: -------------------------------------------------------------------------------- 1 | 2 | /* os module interface */ 3 | 4 | #ifndef Py_OSMODULE_H 5 | #define Py_OSMODULE_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000 11 | PyAPI_FUNC(PyObject *) PyOS_FSPath(PyObject *path); 12 | #endif 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | #endif /* !Py_OSMODULE_H */ 18 | -------------------------------------------------------------------------------- /python/3.9/include/picklebufobject.h: -------------------------------------------------------------------------------- 1 | /* PickleBuffer object. This is built-in for ease of use from third-party 2 | * C extensions. 3 | */ 4 | 5 | #ifndef Py_PICKLEBUFOBJECT_H 6 | #define Py_PICKLEBUFOBJECT_H 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #ifndef Py_LIMITED_API 12 | 13 | PyAPI_DATA(PyTypeObject) PyPickleBuffer_Type; 14 | 15 | #define PyPickleBuffer_Check(op) Py_IS_TYPE(op, &PyPickleBuffer_Type) 16 | 17 | /* Create a PickleBuffer redirecting to the given buffer-enabled object */ 18 | PyAPI_FUNC(PyObject *) PyPickleBuffer_FromObject(PyObject *); 19 | /* Get the PickleBuffer's underlying view to the original object 20 | * (NULL if released) 21 | */ 22 | PyAPI_FUNC(const Py_buffer *) PyPickleBuffer_GetBuffer(PyObject *); 23 | /* Release the PickleBuffer. Returns 0 on success, -1 on error. */ 24 | PyAPI_FUNC(int) PyPickleBuffer_Release(PyObject *); 25 | 26 | #endif /* !Py_LIMITED_API */ 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | #endif /* !Py_PICKLEBUFOBJECT_H */ 32 | -------------------------------------------------------------------------------- /python/3.9/include/pydebug.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_LIMITED_API 2 | #ifndef Py_PYDEBUG_H 3 | #define Py_PYDEBUG_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_DATA(int) Py_DebugFlag; 9 | PyAPI_DATA(int) Py_VerboseFlag; 10 | PyAPI_DATA(int) Py_QuietFlag; 11 | PyAPI_DATA(int) Py_InteractiveFlag; 12 | PyAPI_DATA(int) Py_InspectFlag; 13 | PyAPI_DATA(int) Py_OptimizeFlag; 14 | PyAPI_DATA(int) Py_NoSiteFlag; 15 | PyAPI_DATA(int) Py_BytesWarningFlag; 16 | PyAPI_DATA(int) Py_FrozenFlag; 17 | PyAPI_DATA(int) Py_IgnoreEnvironmentFlag; 18 | PyAPI_DATA(int) Py_DontWriteBytecodeFlag; 19 | PyAPI_DATA(int) Py_NoUserSiteDirectory; 20 | PyAPI_DATA(int) Py_UnbufferedStdioFlag; 21 | PyAPI_DATA(int) Py_HashRandomizationFlag; 22 | PyAPI_DATA(int) Py_IsolatedFlag; 23 | 24 | #ifdef MS_WINDOWS 25 | PyAPI_DATA(int) Py_LegacyWindowsFSEncodingFlag; 26 | PyAPI_DATA(int) Py_LegacyWindowsStdioFlag; 27 | #endif 28 | 29 | /* this is a wrapper around getenv() that pays attention to 30 | Py_IgnoreEnvironmentFlag. It should be used for getting variables like 31 | PYTHONPATH and PYTHONHOME from the environment */ 32 | #define Py_GETENV(s) (Py_IgnoreEnvironmentFlag ? NULL : getenv(s)) 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | #endif /* !Py_PYDEBUG_H */ 38 | #endif /* Py_LIMITED_API */ 39 | -------------------------------------------------------------------------------- /python/3.9/include/pyfpe.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_PYFPE_H 2 | #define Py_PYFPE_H 3 | /* Header excluded from the stable API */ 4 | #ifndef Py_LIMITED_API 5 | 6 | /* These macros used to do something when Python was built with --with-fpectl, 7 | * but support for that was dropped in 3.7. We continue to define them though, 8 | * to avoid breaking API users. 9 | */ 10 | 11 | #define PyFPE_START_PROTECT(err_string, leave_stmt) 12 | #define PyFPE_END_PROTECT(v) 13 | 14 | #endif /* !defined(Py_LIMITED_API) */ 15 | #endif /* !Py_PYFPE_H */ 16 | -------------------------------------------------------------------------------- /python/3.9/include/pyframe.h: -------------------------------------------------------------------------------- 1 | /* Limited C API of PyFrame API 2 | * 3 | * Include "frameobject.h" to get the PyFrameObject structure. 4 | */ 5 | 6 | #ifndef Py_PYFRAME_H 7 | #define Py_PYFRAME_H 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | typedef struct _frame PyFrameObject; 13 | 14 | /* Return the line of code the frame is currently executing. */ 15 | PyAPI_FUNC(int) PyFrame_GetLineNumber(PyFrameObject *); 16 | 17 | PyAPI_FUNC(PyCodeObject *) PyFrame_GetCode(PyFrameObject *frame); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif /* !Py_PYFRAME_H */ 23 | -------------------------------------------------------------------------------- /python/3.9/include/pystrcmp.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_STRCMP_H 2 | #define Py_STRCMP_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_FUNC(int) PyOS_mystrnicmp(const char *, const char *, Py_ssize_t); 9 | PyAPI_FUNC(int) PyOS_mystricmp(const char *, const char *); 10 | 11 | #ifdef MS_WINDOWS 12 | #define PyOS_strnicmp strnicmp 13 | #define PyOS_stricmp stricmp 14 | #else 15 | #define PyOS_strnicmp PyOS_mystrnicmp 16 | #define PyOS_stricmp PyOS_mystricmp 17 | #endif 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif /* !Py_STRCMP_H */ 24 | -------------------------------------------------------------------------------- /python/3.9/include/pystrhex.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_STRHEX_H 2 | #define Py_STRHEX_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #ifndef Py_LIMITED_API 9 | /* Returns a str() containing the hex representation of argbuf. */ 10 | PyAPI_FUNC(PyObject*) _Py_strhex(const char* argbuf, const Py_ssize_t arglen); 11 | /* Returns a bytes() containing the ASCII hex representation of argbuf. */ 12 | PyAPI_FUNC(PyObject*) _Py_strhex_bytes(const char* argbuf, const Py_ssize_t arglen); 13 | /* These variants include support for a separator between every N bytes: */ 14 | PyAPI_FUNC(PyObject*) _Py_strhex_with_sep(const char* argbuf, const Py_ssize_t arglen, const PyObject* sep, const int bytes_per_group); 15 | PyAPI_FUNC(PyObject*) _Py_strhex_bytes_with_sep(const char* argbuf, const Py_ssize_t arglen, const PyObject* sep, const int bytes_per_group); 16 | #endif /* !Py_LIMITED_API */ 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif /* !Py_STRHEX_H */ 23 | -------------------------------------------------------------------------------- /python/3.9/include/rangeobject.h: -------------------------------------------------------------------------------- 1 | 2 | /* Range object interface */ 3 | 4 | #ifndef Py_RANGEOBJECT_H 5 | #define Py_RANGEOBJECT_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | /* 11 | A range object represents an integer range. This is an immutable object; 12 | a range cannot change its value after creation. 13 | 14 | Range objects behave like the corresponding tuple objects except that 15 | they are represented by a start, stop, and step datamembers. 16 | */ 17 | 18 | PyAPI_DATA(PyTypeObject) PyRange_Type; 19 | PyAPI_DATA(PyTypeObject) PyRangeIter_Type; 20 | PyAPI_DATA(PyTypeObject) PyLongRangeIter_Type; 21 | 22 | #define PyRange_Check(op) Py_IS_TYPE(op, &PyRange_Type) 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | #endif /* !Py_RANGEOBJECT_H */ 28 | -------------------------------------------------------------------------------- /python/3.9/include/sysmodule.h: -------------------------------------------------------------------------------- 1 | 2 | /* System module interface */ 3 | 4 | #ifndef Py_SYSMODULE_H 5 | #define Py_SYSMODULE_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | PyAPI_FUNC(PyObject *) PySys_GetObject(const char *); 11 | PyAPI_FUNC(int) PySys_SetObject(const char *, PyObject *); 12 | 13 | PyAPI_FUNC(void) PySys_SetArgv(int, wchar_t **); 14 | PyAPI_FUNC(void) PySys_SetArgvEx(int, wchar_t **, int); 15 | PyAPI_FUNC(void) PySys_SetPath(const wchar_t *); 16 | 17 | PyAPI_FUNC(void) PySys_WriteStdout(const char *format, ...) 18 | Py_GCC_ATTRIBUTE((format(printf, 1, 2))); 19 | PyAPI_FUNC(void) PySys_WriteStderr(const char *format, ...) 20 | Py_GCC_ATTRIBUTE((format(printf, 1, 2))); 21 | PyAPI_FUNC(void) PySys_FormatStdout(const char *format, ...); 22 | PyAPI_FUNC(void) PySys_FormatStderr(const char *format, ...); 23 | 24 | PyAPI_FUNC(void) PySys_ResetWarnOptions(void); 25 | PyAPI_FUNC(void) PySys_AddWarnOption(const wchar_t *); 26 | PyAPI_FUNC(void) PySys_AddWarnOptionUnicode(PyObject *); 27 | PyAPI_FUNC(int) PySys_HasWarnOptions(void); 28 | 29 | PyAPI_FUNC(void) PySys_AddXOption(const wchar_t *); 30 | PyAPI_FUNC(PyObject *) PySys_GetXOptions(void); 31 | 32 | #ifndef Py_LIMITED_API 33 | # define Py_CPYTHON_SYSMODULE_H 34 | # include "cpython/sysmodule.h" 35 | # undef Py_CPYTHON_SYSMODULE_H 36 | #endif 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | #endif /* !Py_SYSMODULE_H */ 42 | -------------------------------------------------------------------------------- /python/3.9/include/traceback.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_TRACEBACK_H 2 | #define Py_TRACEBACK_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | /* Traceback interface */ 8 | 9 | PyAPI_FUNC(int) PyTraceBack_Here(PyFrameObject *); 10 | PyAPI_FUNC(int) PyTraceBack_Print(PyObject *, PyObject *); 11 | 12 | /* Reveal traceback type so we can typecheck traceback objects */ 13 | PyAPI_DATA(PyTypeObject) PyTraceBack_Type; 14 | #define PyTraceBack_Check(v) Py_IS_TYPE(v, &PyTraceBack_Type) 15 | 16 | 17 | #ifndef Py_LIMITED_API 18 | # define Py_CPYTHON_TRACEBACK_H 19 | # include "cpython/traceback.h" 20 | # undef Py_CPYTHON_TRACEBACK_H 21 | #endif 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_TRACEBACK_H */ 27 | -------------------------------------------------------------------------------- /python/3.9/include/tracemalloc.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_TRACEMALLOC_H 2 | #define Py_TRACEMALLOC_H 3 | 4 | #ifndef Py_LIMITED_API 5 | /* Track an allocated memory block in the tracemalloc module. 6 | Return 0 on success, return -1 on error (failed to allocate memory to store 7 | the trace). 8 | 9 | Return -2 if tracemalloc is disabled. 10 | 11 | If memory block is already tracked, update the existing trace. */ 12 | PyAPI_FUNC(int) PyTraceMalloc_Track( 13 | unsigned int domain, 14 | uintptr_t ptr, 15 | size_t size); 16 | 17 | /* Untrack an allocated memory block in the tracemalloc module. 18 | Do nothing if the block was not tracked. 19 | 20 | Return -2 if tracemalloc is disabled, otherwise return 0. */ 21 | PyAPI_FUNC(int) PyTraceMalloc_Untrack( 22 | unsigned int domain, 23 | uintptr_t ptr); 24 | 25 | /* Get the traceback where a memory block was allocated. 26 | 27 | Return a tuple of (filename: str, lineno: int) tuples. 28 | 29 | Return None if the tracemalloc module is disabled or if the memory block 30 | is not tracked by tracemalloc. 31 | 32 | Raise an exception and return NULL on error. */ 33 | PyAPI_FUNC(PyObject*) _PyTraceMalloc_GetTraceback( 34 | unsigned int domain, 35 | uintptr_t ptr); 36 | #endif 37 | 38 | #endif /* !Py_TRACEMALLOC_H */ 39 | -------------------------------------------------------------------------------- /python/3.9/include/ucnhash.h: -------------------------------------------------------------------------------- 1 | /* Unicode name database interface */ 2 | #ifndef Py_LIMITED_API 3 | #ifndef Py_UCNHASH_H 4 | #define Py_UCNHASH_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | /* revised ucnhash CAPI interface (exported through a "wrapper") */ 10 | 11 | #define PyUnicodeData_CAPSULE_NAME "unicodedata.ucnhash_CAPI" 12 | 13 | typedef struct { 14 | 15 | /* Size of this struct */ 16 | int size; 17 | 18 | /* Get name for a given character code. Returns non-zero if 19 | success, zero if not. Does not set Python exceptions. 20 | If self is NULL, data come from the default version of the database. 21 | If it is not NULL, it should be a unicodedata.ucd_X_Y_Z object */ 22 | int (*getname)(PyObject *self, Py_UCS4 code, char* buffer, int buflen, 23 | int with_alias_and_seq); 24 | 25 | /* Get character code for a given name. Same error handling 26 | as for getname. */ 27 | int (*getcode)(PyObject *self, const char* name, int namelen, Py_UCS4* code, 28 | int with_named_seq); 29 | 30 | } _PyUnicode_Name_CAPI; 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | #endif /* !Py_UCNHASH_H */ 36 | #endif /* !Py_LIMITED_API */ 37 | -------------------------------------------------------------------------------- /python/3.9/lib/python39.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flexsim/FlexSimPy/79b0aed7b3e677ceb41754df2dba8cdb4a001a78/python/3.9/lib/python39.lib --------------------------------------------------------------------------------