Debian Codegraph @

Include/internal/pycore_atexit.h

raw
1 #ifndef Py_INTERNAL_ATEXIT_H
2 #define Py_INTERNAL_ATEXIT_H
3
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
13
14 #ifdef Py_GIL_DISABLED
15 # define _PyAtExit_LockCallbacks(state) PyMutex_Lock(&state->ll_callbacks_lock);
16 # define _PyAtExit_UnlockCallbacks(state) PyMutex_Unlock(&state->ll_callbacks_lock);
17 #else
18 # define _PyAtExit_LockCallbacks(state)
19 # define _PyAtExit_UnlockCallbacks(state)
20 #endif
21
22 // Export for '_interpchannels' shared extension
23 PyAPI_FUNC(int) _Py_AtExit(
24 PyInterpreterState *interp,
25 atexit_datacallbackfunc func,
26 void *data);
27
28 #ifdef __cplusplus
29 }
30 #endif
31 #endif /* !Py_INTERNAL_ATEXIT_H */