Files
typthon/Include/internal/pycore_pythonrun.h
copilot-swe-agent[bot] b198f511d2 Rename Py_ to Ty_ throughout C API
Massive automated renaming of all Py_/PyObject/etc. prefixes to Ty_/TyObject/etc.
This includes:
- All public API types (TyObject, TyTypeObject, etc.)
- All public API functions (Ty_Initialize, Ty_BuildValue, etc.)
- All internal API (_Ty_ prefixes)
- Reference counting macros (Ty_INCREF, Ty_DECREF, etc.)
- Type flags (Ty_TPFLAGS_*)
- Debug flags (Ty_DEBUG, Ty_TRACE_REFS, etc.)
- All object type APIs (TyList_, TyDict_, TyUnicode_, etc.)

This changes over 60,000 occurrences across 1000+ files.

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2025-12-29 17:37:49 +00:00

63 lines
1.5 KiB
C

#ifndef Ty_INTERNAL_PYTHONRUN_H
#define Ty_INTERNAL_PYTHONRUN_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef Ty_BUILD_CORE
# error "this header requires Ty_BUILD_CORE define"
#endif
extern int _PyRun_SimpleFileObject(
FILE *fp,
TyObject *filename,
int closeit,
PyCompilerFlags *flags);
extern int _PyRun_AnyFileObject(
FILE *fp,
TyObject *filename,
int closeit,
PyCompilerFlags *flags);
extern int _PyRun_InteractiveLoopObject(
FILE *fp,
TyObject *filename,
PyCompilerFlags *flags);
extern int _TyObject_SupportedAsScript(TyObject *);
extern const char* _Ty_SourceAsString(
TyObject *cmd,
const char *funcname,
const char *what,
PyCompilerFlags *cf,
TyObject **cmd_copy);
/* Stack size, in "pointers". This must be large enough, so
* no two calls to check recursion depth are more than this far
* apart. In practice, that means it must be larger than the C
* stack consumption of TyEval_EvalDefault */
#if defined(_Ty_ADDRESS_SANITIZER) || defined(_Ty_THREAD_SANITIZER)
# define _TyOS_LOG2_STACK_MARGIN 12
#elif defined(Ty_DEBUG) && defined(WIN32)
# define _TyOS_LOG2_STACK_MARGIN 12
#else
# define _TyOS_LOG2_STACK_MARGIN 11
#endif
#define _TyOS_STACK_MARGIN (1 << _TyOS_LOG2_STACK_MARGIN)
#define _TyOS_STACK_MARGIN_BYTES (_TyOS_STACK_MARGIN * sizeof(void *))
#if SIZEOF_VOID_P == 8
# define _TyOS_STACK_MARGIN_SHIFT (_TyOS_LOG2_STACK_MARGIN + 3)
#else
# define _TyOS_STACK_MARGIN_SHIFT (_TyOS_LOG2_STACK_MARGIN + 2)
#endif
#ifdef __cplusplus
}
#endif
#endif // !Ty_INTERNAL_PYTHONRUN_H