config.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #pragma once
  2. // clang-format off
  3. #define PK_VERSION "2.0.2"
  4. #define PK_VERSION_MAJOR 2
  5. #define PK_VERSION_MINOR 0
  6. #define PK_VERSION_PATCH 2
  7. /*************** feature settings ***************/
  8. // Whether to compile os-related modules or not
  9. #ifndef PK_ENABLE_OS // can be overridden by cmake
  10. #define PK_ENABLE_OS 1
  11. #endif
  12. // GC min threshold
  13. #ifndef PK_GC_MIN_THRESHOLD // can be overridden by cmake
  14. #define PK_GC_MIN_THRESHOLD 16384
  15. #endif
  16. /*************** debug settings ***************/
  17. // Do not edit the following settings unless you know what you are doing
  18. #define PK_DEBUG_CEVAL_STEP 0
  19. #define PK_DEBUG_MEMORY_POOL 0
  20. #define PK_DEBUG_NO_AUTO_GC 0
  21. #define PK_DEBUG_GC_STATS 0
  22. #define PK_DEBUG_COMPILER 0
  23. /*************** internal settings ***************/
  24. // This is the maximum size of the value stack in py_TValue units
  25. // The actual size in bytes equals `sizeof(py_TValue) * PK_VM_STACK_SIZE`
  26. #define PK_VM_STACK_SIZE 16384
  27. // This is the maximum number of local variables in a function
  28. // (not recommended to change this)
  29. #define PK_MAX_CO_VARNAMES 64
  30. #ifdef _WIN32
  31. #define PK_PLATFORM_SEP '\\'
  32. #else
  33. #define PK_PLATFORM_SEP '/'
  34. #endif