summaryrefslogtreecommitdiff
path: root/perly.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-10-10 20:42:40 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-10-10 20:42:40 +0000
commitc76ac1ee16c5c9591d8ffad5a0651b7f81738b68 (patch)
tree26af37f6b40806cfedd24504ae354c5b90d4c471 /perly.c
parenta99ba4038e8029c0d033ef497d3a0f8653f0d570 (diff)
downloadperl-c76ac1ee16c5c9591d8ffad5a0651b7f81738b68.tar.gz
revert SAVEDESTRUCTOR() to accepting void(*)(void*) for source
compatibility; introduce SAVEDESTRUCTOR_X() that accepts void(*)(pTHX_ void*) p4raw-id: //depot/perl@4339
Diffstat (limited to 'perly.c')
-rw-r--r--perly.c37
1 files changed, 16 insertions, 21 deletions
diff --git a/perly.c b/perly.c
index 9b619c9fcb..0ed07fcf12 100644
--- a/perly.c
+++ b/perly.c
@@ -29,7 +29,22 @@ struct ysv {
YYSTYPE oldyylval;
};
-static void yydestruct(pTHXo_ void *ptr);
+static void yydestruct(void *ptr);
+
+static void
+yydestruct(void *ptr)
+{
+ struct ysv* ysave = (struct ysv*)ptr;
+ if (ysave->yyss) Safefree(ysave->yyss);
+ if (ysave->yyvs) Safefree(ysave->yyvs);
+ yydebug = ysave->oldyydebug;
+ yynerrs = ysave->oldyynerrs;
+ yyerrflag = ysave->oldyyerrflag;
+ yychar = ysave->oldyychar;
+ yyval = ysave->oldyyval;
+ yylval = ysave->oldyylval;
+ Safefree(ysave);
+}
#line 49 "perly.y"
#if 0 /* get this from perly.h instead */
@@ -2479,23 +2494,3 @@ yyabort:
yyaccept:
return retval;
}
-
-#ifdef PERL_OBJECT
-#define NO_XSLOCKS
-#include "XSUB.h"
-#endif
-
-static void
-yydestruct(pTHXo_ void *ptr)
-{
- struct ysv* ysave = (struct ysv*)ptr;
- if (ysave->yyss) Safefree(ysave->yyss);
- if (ysave->yyvs) Safefree(ysave->yyvs);
- yydebug = ysave->oldyydebug;
- yynerrs = ysave->oldyynerrs;
- yyerrflag = ysave->oldyyerrflag;
- yychar = ysave->oldyychar;
- yyval = ysave->oldyyval;
- yylval = ysave->oldyylval;
- Safefree(ysave);
-}