pycore_code.h 542 B

123456789101112131415161718192021222324252627
  1. #ifndef Py_INTERNAL_CODE_H
  2. #define Py_INTERNAL_CODE_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. typedef struct {
  7. PyObject *ptr; /* Cached pointer (borrowed reference) */
  8. uint64_t globals_ver; /* ma_version of global dict */
  9. uint64_t builtins_ver; /* ma_version of builtin dict */
  10. } _PyOpcache_LoadGlobal;
  11. struct _PyOpcache {
  12. union {
  13. _PyOpcache_LoadGlobal lg;
  14. } u;
  15. char optimized;
  16. };
  17. /* Private API */
  18. int _PyCode_InitOpcache(PyCodeObject *co);
  19. #ifdef __cplusplus
  20. }
  21. #endif
  22. #endif /* !Py_INTERNAL_CODE_H */