summaryrefslogtreecommitdiff
path: root/perly.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-01-30 09:23:36 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-01-30 09:23:36 +0000
commit76e3520e1f6b7df33cd381a2cf4f1fce3d69c8a4 (patch)
tree1d4e5f5653fd9def6bd71cc0cb536400223f4d3e /perly.c
parent6ad3d225cec2692b410002582f5558652eea32c8 (diff)
downloadperl-76e3520e1f6b7df33cd381a2cf4f1fce3d69c8a4.tar.gz
[asperl] added AS patch#2
p4raw-id: //depot/asperl@443
Diffstat (limited to 'perly.c')
-rw-r--r--perly.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/perly.c b/perly.c
index 7117566c20..e55dcffb82 100644
--- a/perly.c
+++ b/perly.c
@@ -6,11 +6,20 @@ static char yysccsid[] = "@(#)yaccpar 1.8 (Berkeley) 01/20/91";
#include "EXTERN.h"
#include "perl.h"
+#ifdef PERL_OBJECT
+static void
+Dep(CPerlObj *pPerl)
+{
+ pPerl->deprecate("\"do\" to call subroutines");
+}
+#define dep() Dep(this)
+#else
static void
dep(void)
{
deprecate("\"do\" to call subroutines");
}
+#endif
#line 16 "perly.c"
#define YYERRCODE 256
@@ -1317,6 +1326,16 @@ yydestruct(void *ptr)
Safefree(ysave);
}
+#ifdef PERL_OBJECT
+static void YYDestructor(void *pPerl, void *ptr)
+{
+ ((CPerlObj*)pPerl)->yydestruct(ptr);
+}
+#define YYDESTRUCT YYDestructor
+#else
+#define YYDESTRUCT yydestruct
+#endif
+
int
yyparse(void)
{
@@ -1335,7 +1354,7 @@ yyparse(void)
#endif
struct ysv *ysave = (struct ysv*)safemalloc(sizeof(struct ysv));
- SAVEDESTRUCTOR(yydestruct, ysave);
+ SAVEDESTRUCTOR(YYDESTRUCT, ysave);
ysave->oldyydebug = yydebug;
ysave->oldyynerrs = yynerrs;
ysave->oldyyerrflag = yyerrflag;