Skip Menu |

This queue is for tickets about the B-Hooks-Parser CPAN distribution.

Report information
The Basics
Id: 45780
Status: resolved
Priority: 0/
Queue: B-Hooks-Parser

People
Owner: EDENC [...] cpan.org
Requestors: RURBAN [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.08
Fixed in: (no value)



Subject: fix MAD failure
MAD needs the attached patch (cygwin) -- Reini Urban
Subject: B-Hooks-Parser-0.08-MAD.patch
difforig B-Hooks-Parser-0.08 diff -u B-Hooks-Parser-0.08/stolen_chunk_of_toke.c.orig --- B-Hooks-Parser-0.08/stolen_chunk_of_toke.c.orig 2008-11-04 02:47:43.000000000 +0100 +++ B-Hooks-Parser-0.08/stolen_chunk_of_toke.c 2009-05-06 14:54:58.296875000 +0200 @@ -39,7 +39,7 @@ #define DPTR2FPTR(t,p) ((t)PTR2nat(p)) /* data pointer to function pointer */ #define FPTR2DPTR(t,p) ((t)PTR2nat(p)) /* function pointer to data pointer */ #define PTR2nat(p) (PTRV)(p) /* pointer to integer of PTRSIZE */ -#define MEM_WRAP_CHECK_(n,t) MEM_WRAP_CHECK(n,t), +/*#define MEM_WRAP_CHECK_(n,t) MEM_WRAP_CHECK(n,t),*/ /* On MacOS, respect nonbreaking spaces */ #ifdef MACOS_TRADITIONAL @@ -92,10 +92,16 @@ #define PL_multi_close (PL_parser->multi_close) #define PL_multi_end (PL_parser->multi_end) #define PL_lex_repl (PL_parser->lex_repl) -#define PL_nexttype (PL_parser->nexttype) #define PL_nexttoke (PL_parser->nexttoke) #define PL_lex_defer (PL_parser->lex_defer) #define PL_lex_expect (PL_parser->lex_expect) +# ifdef PERL_MAD +# define PL_curforce (PL_parser->curforce) +# define PL_lasttoke (PL_parser->lasttoke) +# else +# define PL_nexttype (PL_parser->nexttype) +# define PL_nextval (PL_parser->nextval) +# endif #endif /* and now we're back to the toke.c stuff again (mst) */ @@ -792,11 +798,23 @@ STATIC void S_force_next(pTHX_ I32 type) { + dVAR; +#ifdef PERL_MAD + if (PL_curforce < 0) + start_force(PL_lasttoke); + PL_nexttoke[PL_curforce].next_type = type; + if (PL_lex_state != LEX_KNOWNEXT) + PL_lex_defer = PL_lex_state; + PL_lex_state = LEX_KNOWNEXT; + PL_lex_expect = PL_expect; + PL_curforce = -1; +#else PL_nexttype[PL_nexttoke] = type; PL_nexttoke++; if (PL_lex_state != LEX_KNOWNEXT) { - PL_lex_defer = PL_lex_state; - PL_lex_expect = PL_expect; - PL_lex_state = LEX_KNOWNEXT; + PL_lex_defer = PL_lex_state; + PL_lex_expect = PL_expect; + PL_lex_state = LEX_KNOWNEXT; } +#endif }
S_force_next() is removed in B-Hooks-Parser-0.10, because it was unused. There appears to be no other MAD-related problem.