diff options
author | Alexander Færøy <ahf@0x90.dk> | 2014-06-29 14:27:12 +0200 |
---|---|---|
committer | Alexander Færøy <ahf@0x90.dk> | 2014-06-29 14:27:12 +0200 |
commit | aaa0cb6e031b067f4d94abda2ccfc2e0ed1ecf7c (patch) | |
tree | d912c830d8deebbca6d62ba10b0dc5423d6144c0 /src/perl/common | |
parent | cce0ff80a2080d551c706eab71ef0e3e5bf6e31f (diff) | |
parent | c5d81c598d7872308725f4f20523a1c593d5ca9e (diff) | |
download | irssi-aaa0cb6e031b067f4d94abda2ccfc2e0ed1ecf7c.zip |
Merge pull request #52 from dgl/stack-cleanup
Correct use of perl stack macros
Diffstat (limited to 'src/perl/common')
-rw-r--r-- | src/perl/common/Expando.xs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/perl/common/Expando.xs b/src/perl/common/Expando.xs index 375a4c2f..e8e8f751 100644 --- a/src/perl/common/Expando.xs +++ b/src/perl/common/Expando.xs @@ -74,6 +74,10 @@ static char *perl_expando_event(PerlExpando *rec, SERVER_REC *server, ret = NULL; if (SvTRUE(ERRSV)) { + (void) POPs; + /* call putback before emitting script error signal as that + * could manipulate the perl stack. */ + PUTBACK; /* make sure we don't get back here */ if (rec->script != NULL) script_unregister_expandos(rec->script); @@ -82,9 +86,9 @@ static char *perl_expando_event(PerlExpando *rec, SERVER_REC *server, } else if (retcount > 0) { ret = g_strdup(POPp); *free_ret = TRUE; + PUTBACK; } - PUTBACK; FREETMPS; LEAVE; |