mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00

This is essentially a cleanup, moving a handful of API declarations to the header files where they fit best, creating new ones when needed. We do the following: * add pycore_debug_offsets.h and move _Py_DebugOffsets, etc. there * inline struct _getargs_runtime_state and struct _gilstate_runtime_state in _PyRuntimeState * move struct _reftracer_runtime_state to the existing pycore_object_state.h * add pycore_audit.h and move to it _Py_AuditHookEntry , _PySys_Audit(), and _PySys_ClearAuditHooks * add audit.h and cpython/audit.h and move the existing audit-related API there *move the perfmap/trampoline API from cpython/sysmodule.h to cpython/ceval.h, and remove the now-empty cpython/sysmodule.h
35 lines
738 B
C
35 lines
738 B
C
#ifndef Py_INTERNAL_AUDIT_H
|
|
#define Py_INTERNAL_AUDIT_H
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#ifndef Py_BUILD_CORE
|
|
# error "this header requires Py_BUILD_CORE define"
|
|
#endif
|
|
|
|
|
|
/* Runtime audit hook state */
|
|
|
|
typedef struct _Py_AuditHookEntry {
|
|
struct _Py_AuditHookEntry *next;
|
|
Py_AuditHookFunction hookCFunction;
|
|
void *userData;
|
|
} _Py_AuditHookEntry;
|
|
|
|
|
|
extern int _PySys_Audit(
|
|
PyThreadState *tstate,
|
|
const char *event,
|
|
const char *argFormat,
|
|
...);
|
|
|
|
// _PySys_ClearAuditHooks() must not be exported: use extern rather than
|
|
// PyAPI_FUNC(). We want minimal exposure of this function.
|
|
extern void _PySys_ClearAuditHooks(PyThreadState *tstate);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif /* !Py_INTERNAL_AUDIT_H */
|