diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-12-08 02:02:33 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-12-08 02:02:33 +0000 |
commit | bebdddfcca3c4bc8bb36ffcdf9e008f3b39772bf (patch) | |
tree | 0df691901d554663c31813979d777a20c0ac36d0 /toke.c | |
parent | 976ef375376ba93630995e81d409fdba5fc17278 (diff) | |
download | perl-bebdddfcca3c4bc8bb36ffcdf9e008f3b39772bf.tar.gz |
use SAVEINT() rather than SAVEDESTRUCTOR() for saving PL_expect etc.
p4raw-id: //depot/perl@4664
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 32 |
1 files changed, 2 insertions, 30 deletions
@@ -28,8 +28,6 @@ static char ident_too_long[] = "Identifier too long"; static void restore_rsfp(pTHXo_ void *f); -static void restore_expect(pTHXo_ void *e); -static void restore_lex_expect(pTHXo_ void *e); #define UTF (PL_hints & HINT_UTF8) /* @@ -380,8 +378,8 @@ Perl_lex_start(pTHX_ SV *line) SAVEI32(PL_lex_defer); SAVEI32(PL_sublex_info.sub_inwhat); SAVESPTR(PL_lex_repl); - SAVEDESTRUCTOR_X(restore_expect, PL_tokenbuf + PL_expect); /* encode as pointer */ - SAVEDESTRUCTOR_X(restore_lex_expect, PL_tokenbuf + PL_lex_expect); + SAVEINT(PL_expect); + SAVEINT(PL_lex_expect); PL_lex_state = LEX_NORMAL; PL_lex_defer = 0; @@ -7034,29 +7032,3 @@ restore_rsfp(pTHXo_ void *f) PerlIO_close(PL_rsfp); PL_rsfp = fp; } - -/* - * restore_expect - * Restores the state of PL_expect when the lexing that begun with a - * start_lex() call has ended. - */ - -static void -restore_expect(pTHXo_ void *e) -{ - /* a safe way to store a small integer in a pointer */ - PL_expect = (expectation)((char *)e - PL_tokenbuf); -} - -/* - * restore_lex_expect - * Restores the state of PL_lex_expect when the lexing that begun with a - * start_lex() call has ended. - */ - -static void -restore_lex_expect(pTHXo_ void *e) -{ - /* a safe way to store a small integer in a pointer */ - PL_lex_expect = (expectation)((char *)e - PL_tokenbuf); -} |