LEAVE;
}
-char* dd_get_linestr(pTHX) {
- if (!DD_HAVE_PARSER) {
- return NULL;
- }
- return SvPVX(PL_linestr);
-}
-
-void dd_set_linestr(pTHX_ char* new_value) {
- int new_len = strlen(new_value);
-
- if (SvLEN(PL_linestr) < new_len) {
- croak("forced to realloc PL_linestr for line %s, bailing out before we crash harder", SvPVX(PL_linestr));
- }
-
- SvGROW(PL_linestr, new_len);
-
- memcpy(SvPVX(PL_linestr), new_value, new_len+1);
-
- SvCUR_set(PL_linestr, new_len);
-
- PL_bufend = SvPVX(PL_linestr) + new_len;
-}
-
char* dd_get_lex_stuff(pTHX) {
return (DD_HAVE_LEX_STUFF ? SvPVX(PL_lex_stuff) : "");
}
return HvNAME(PL_curstash);
}
-int dd_get_linestr_offset(pTHX) {
- char* linestr;
- if (!DD_HAVE_PARSER) {
- return -1;
- }
- linestr = SvPVX(PL_linestr);
- return PL_bufptr - linestr;
-}
-
char* dd_move_past_token (pTHX_ char* s) {
/*
filter_add(dd_filter_realloc, NULL);
char*
-get_linestr()
- CODE:
- RETVAL = dd_get_linestr(aTHX);
- OUTPUT:
- RETVAL
-
-void
-set_linestr(char* new_value)
- CODE:
- dd_set_linestr(aTHX_ new_value);
-
-char*
get_lex_stuff()
CODE:
RETVAL = dd_get_lex_stuff(aTHX);
RETVAL
int
-get_linestr_offset()
- CODE:
- RETVAL = dd_get_linestr_offset(aTHX);
- OUTPUT:
- RETVAL
-
-int
toke_scan_word(int offset, int handle_package)
CODE:
RETVAL = dd_toke_scan_word(aTHX_ offset, handle_package);
requires 'Scalar::Util';
requires 'B::Hooks::OP::Check' => '0.10';
+requires 'B::Hooks::Parser';
build_requires 'B::Hooks::OP::Check' => '0.10';
+build_requires 'B::Hooks::Parser';
configure_requires 'ExtUtils::Depends';
configure_requires 'B::Hooks::OP::Check' => '0.10';
+configure_requires 'B::Hooks::Parser';
test_requires 'Test::More';
test_requires 'B::Hooks::EndOfScope';
$(OBJECT) : stolen_chunk_of_toke.c
EOM
-my $pkg = ExtUtils::Depends->new('Devel::Declare', 'B::Hooks::OP::Check');
+my $pkg = ExtUtils::Depends->new('Devel::Declare', 'B::Hooks::OP::Check', 'B::Hooks::Parser');
WriteMakefile(
dist => {