mirror of
https://github.com/irssi/irssi.git
synced 2026-08-19 08:32:07 +02:00
Merge pull request #49 from dgl/stackem
Move PUTBACK to within the scope which uses the stack
This commit is contained in:
commit
cce0ff80a2
1 changed files with 4 additions and 9 deletions
|
|
@ -218,8 +218,6 @@ static int perl_script_eval(PERL_SCRIPT_REC *script)
|
||||||
{
|
{
|
||||||
dSP;
|
dSP;
|
||||||
char *error;
|
char *error;
|
||||||
int retcount;
|
|
||||||
SV *ret;
|
|
||||||
|
|
||||||
ENTER;
|
ENTER;
|
||||||
SAVETMPS;
|
SAVETMPS;
|
||||||
|
|
@ -230,10 +228,10 @@ static int perl_script_eval(PERL_SCRIPT_REC *script)
|
||||||
XPUSHs(sv_2mortal(new_pv(script->name)));
|
XPUSHs(sv_2mortal(new_pv(script->name)));
|
||||||
PUTBACK;
|
PUTBACK;
|
||||||
|
|
||||||
retcount = perl_call_pv(script->path != NULL ?
|
perl_call_pv(script->path != NULL ?
|
||||||
"Irssi::Core::eval_file" :
|
"Irssi::Core::eval_file" :
|
||||||
"Irssi::Core::eval_data",
|
"Irssi::Core::eval_data",
|
||||||
G_EVAL|G_SCALAR);
|
G_EVAL|G_DISCARD);
|
||||||
SPAGAIN;
|
SPAGAIN;
|
||||||
|
|
||||||
error = NULL;
|
error = NULL;
|
||||||
|
|
@ -245,11 +243,8 @@ static int perl_script_eval(PERL_SCRIPT_REC *script)
|
||||||
signal_emit("script error", 2, script, error);
|
signal_emit("script error", 2, script, error);
|
||||||
g_free(error);
|
g_free(error);
|
||||||
}
|
}
|
||||||
} else if (retcount > 0) {
|
|
||||||
ret = POPs;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PUTBACK;
|
|
||||||
FREETMPS;
|
FREETMPS;
|
||||||
LEAVE;
|
LEAVE;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue