diff options
author | Alexander Færøy <ahf@0x90.dk> | 2014-06-29 14:24:20 +0200 |
---|---|---|
committer | Alexander Færøy <ahf@0x90.dk> | 2014-06-29 14:24:20 +0200 |
commit | cce0ff80a2080d551c706eab71ef0e3e5bf6e31f (patch) | |
tree | 1520d2724e0e796b72026b9c36fce666c96f9cc4 /src | |
parent | 17b9bb12bf1c5c89f7880641ecde1fb17f2b5b22 (diff) | |
parent | 211422cbe81570b1a70a6c4fe8a09b84cfa4f646 (diff) | |
download | irssi-cce0ff80a2080d551c706eab71ef0e3e5bf6e31f.zip |
Merge pull request #49 from dgl/stackem
Move PUTBACK to within the scope which uses the stack
Diffstat (limited to 'src')
-rw-r--r-- | src/perl/perl-core.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/perl/perl-core.c b/src/perl/perl-core.c index ee0c845e..d0606f38 100644 --- a/src/perl/perl-core.c +++ b/src/perl/perl-core.c @@ -218,8 +218,6 @@ static int perl_script_eval(PERL_SCRIPT_REC *script) { dSP; char *error; - int retcount; - SV *ret; ENTER; SAVETMPS; @@ -230,10 +228,10 @@ static int perl_script_eval(PERL_SCRIPT_REC *script) XPUSHs(sv_2mortal(new_pv(script->name))); PUTBACK; - retcount = perl_call_pv(script->path != NULL ? - "Irssi::Core::eval_file" : - "Irssi::Core::eval_data", - G_EVAL|G_SCALAR); + perl_call_pv(script->path != NULL ? + "Irssi::Core::eval_file" : + "Irssi::Core::eval_data", + G_EVAL|G_DISCARD); SPAGAIN; error = NULL; @@ -245,11 +243,8 @@ static int perl_script_eval(PERL_SCRIPT_REC *script) signal_emit("script error", 2, script, error); g_free(error); } - } else if (retcount > 0) { - ret = POPs; } - PUTBACK; FREETMPS; LEAVE; |