# ifndef PL_oldbufptr
# define PL_oldbufptr PL_parser->oldbufptr
# endif
+# ifndef PL_lex_inwhat
+# define PL_lex_inwhat PL_parser->lex_inwhat
+# endif
#else
# ifndef PL_linestr
# define PL_linestr PL_Ilinestr
# ifndef PL_oldbufptr
# define PL_oldbufptr PL_Ioldbufptr
# endif
+# ifndef PL_lex_inwhat
+# define PL_lex_inwhat PL_Ilex_inwhat
+# endif
#endif
#ifndef I_WORKAROUND_REQUIRE_PROPAGATION
/* --- Check functions ----------------------------------------------------- */
-STATIC STRLEN indirect_nextline(const char *s, STRLEN len) {
- STRLEN i;
-
- for (i = 0; i < len; ++i) {
- if (s[i] == '\n') {
- ++i;
- while (i < len && s[i] == '\r')
- ++i;
- break;
- }
- }
-
- return i;
-}
-
STATIC int indirect_find(pTHX_ SV *name_sv, const char *line_bufptr, STRLEN *name_pos) {
#define indirect_find(NSV, LBP, NP) indirect_find(aTHX_ (NSV), (LBP), (NP))
STRLEN name_len, line_len;
const char *name, *name_end;
const char *line, *line_end;
- const char *p, *t, *u;
+ const char *p;
line = SvPV_const(PL_linestr, line_len);
line_end = line + line_len;
++p;
}
- t = line;
- u = t;
- while (t <= p) {
- STRLEN i = indirect_nextline(t, line_len);
- if (i >= line_len)
- break;
- u = t;
- t += i;
- line_len -= i;
- }
- *name_pos = p - u;
+ *name_pos = p - line;
return 1;
}