logo

live-bootstrap

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

graminit-regen.patch (880B)


  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-3.1.5/Parser/parsetok.c 2022-10-11 14:11:29.522466304 +1100
  10. +++ Python-3.1.5/Parser/parsetok.c 2022-10-11 14:11:42.786627172 +1100
  11. @@ -8,7 +8,6 @@
  12. #include "parser.h"
  13. #include "parsetok.h"
  14. #include "errcode.h"
  15. -#include "graminit.h"
  16. /* Forward */
  17. @@ -240,7 +239,7 @@
  18. }
  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;