mirror of
https://github.com/irssi/irssi.git
synced 2026-08-18 16:12:30 +02:00
Correct use of perl stack macros
Further to pull #49 this is the result of an audit of the use of perl stack macros. There were several cases where PUTBACK was being called where the stack pointer could be out-of-date. Also some misc. cleanup where the macros were used needlessly.
This commit is contained in:
parent
9d0d4d9437
commit
c5d81c598d
6 changed files with 8 additions and 12 deletions
|
|
@ -73,6 +73,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);
|
||||
|
|
@ -81,9 +85,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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue