logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>

graminit-regen.patch (853B)


  1. SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
  2. SPDX-License-Identifier: PSF-2.0
  3. There is a cycle in the build process. graminit.h requires
  4. parsetok.c to be built, but graminit.h is included in parsetok.c.
  5. Luckily the cycle can be broken by just NOP-ing the logic from
  6. graminit.h.
  7. We apply this patch before regen-ing graminit.h and revert it
  8. afterward.
  9. --- Python-2.5.6/Parser/parsetok.c 2022-10-09 20:22:15.431229996 +1100
  10. +++ Python-2.5.6/Parser/parsetok.c 2022-10-09 20:22:57.981822483 +1100
  11. @@ -8,7 +8,6 @@
  12. #include "parser.h"
  13. #include "parsetok.h"
  14. #include "errcode.h"
  15. -#include "graminit.h"
  16. int Py_TabcheckFlag;
  17. @@ -239,7 +238,7 @@
  18. err_ret->text = text;
  19. }
  20. } else if (tok->encoding != NULL) {
  21. - node* r = PyNode_New(encoding_decl);
  22. + node* r = NULL;
  23. if (!r) {
  24. err_ret->error = E_NOMEM;
  25. n = NULL;