diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/Makefile.am | 2 | ||||
-rw-r--r-- | src/fe-common/core/Makefile.am | 2 | ||||
-rw-r--r-- | src/fe-common/irc/Makefile.am | 2 | ||||
-rw-r--r-- | src/fe-common/irc/dcc/Makefile.am | 2 | ||||
-rw-r--r-- | src/fe-common/irc/notifylist/Makefile.am | 2 | ||||
-rw-r--r-- | src/fe-none/Makefile.am | 2 | ||||
-rw-r--r-- | src/fe-text/Makefile.am | 2 | ||||
-rw-r--r-- | src/irc/core/Makefile.am | 2 | ||||
-rw-r--r-- | src/irc/dcc/Makefile.am | 2 | ||||
-rw-r--r-- | src/irc/flood/Makefile.am | 2 | ||||
-rw-r--r-- | src/irc/notifylist/Makefile.am | 2 | ||||
-rw-r--r-- | src/irc/proxy/Makefile.am | 2 | ||||
-rw-r--r-- | src/lib-config/Makefile.am | 2 | ||||
-rw-r--r-- | src/perl/Makefile.am | 2 | ||||
-rw-r--r-- | src/perl/common/Expando.xs | 6 | ||||
-rw-r--r-- | src/perl/perl-common.c | 4 | ||||
-rw-r--r-- | src/perl/perl-core.c | 16 | ||||
-rw-r--r-- | src/perl/perl-signals.c | 1 | ||||
-rw-r--r-- | src/perl/perl-sources.c | 5 | ||||
-rw-r--r-- | src/perl/textui/Statusbar.xs | 1 |
20 files changed, 26 insertions, 35 deletions
diff --git a/src/core/Makefile.am b/src/core/Makefile.am index 59ae0a8d..fc32e17e 100644 --- a/src/core/Makefile.am +++ b/src/core/Makefile.am @@ -1,6 +1,6 @@ noinst_LIBRARIES = libcore.a -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/core \ $(GLIB_CFLAGS) \ diff --git a/src/fe-common/core/Makefile.am b/src/fe-common/core/Makefile.am index eb826414..e755b510 100644 --- a/src/fe-common/core/Makefile.am +++ b/src/fe-common/core/Makefile.am @@ -1,6 +1,6 @@ noinst_LIBRARIES = libfe_common_core.a -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/src -I$(top_srcdir)/src/core/ \ $(GLIB_CFLAGS) \ -DHELPDIR=\""$(datadir)/irssi/help"\" \ diff --git a/src/fe-common/irc/Makefile.am b/src/fe-common/irc/Makefile.am index 9ca9ccfa..463f145c 100644 --- a/src/fe-common/irc/Makefile.am +++ b/src/fe-common/irc/Makefile.am @@ -2,7 +2,7 @@ SUBDIRS = dcc notifylist noinst_LIBRARIES = libfe_common_irc.a -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/core/ \ -I$(top_srcdir)/src/irc/core/ \ diff --git a/src/fe-common/irc/dcc/Makefile.am b/src/fe-common/irc/dcc/Makefile.am index 7161f262..e0ad6296 100644 --- a/src/fe-common/irc/dcc/Makefile.am +++ b/src/fe-common/irc/dcc/Makefile.am @@ -1,6 +1,6 @@ noinst_LIBRARIES = libfe_irc_dcc.a -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/core/ \ -I$(top_srcdir)/src/irc/core/ \ diff --git a/src/fe-common/irc/notifylist/Makefile.am b/src/fe-common/irc/notifylist/Makefile.am index 94f5a791..b990dcd2 100644 --- a/src/fe-common/irc/notifylist/Makefile.am +++ b/src/fe-common/irc/notifylist/Makefile.am @@ -1,6 +1,6 @@ noinst_LIBRARIES = libfe_irc_notifylist.a -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/core/ \ -I$(top_srcdir)/src/irc/core/ \ diff --git a/src/fe-none/Makefile.am b/src/fe-none/Makefile.am index d06f04e1..1233fc91 100644 --- a/src/fe-none/Makefile.am +++ b/src/fe-none/Makefile.am @@ -1,6 +1,6 @@ bin_PROGRAMS = botti -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/core/ \ -I$(top_srcdir)/src/irc/core/ \ diff --git a/src/fe-text/Makefile.am b/src/fe-text/Makefile.am index b8ec634e..b9538e60 100644 --- a/src/fe-text/Makefile.am +++ b/src/fe-text/Makefile.am @@ -1,6 +1,6 @@ bin_PROGRAMS = irssi -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/core/ \ -I$(top_srcdir)/src/fe-common/core/ \ diff --git a/src/irc/core/Makefile.am b/src/irc/core/Makefile.am index fa4ca3f9..3db5cf0e 100644 --- a/src/irc/core/Makefile.am +++ b/src/irc/core/Makefile.am @@ -1,6 +1,6 @@ noinst_LIBRARIES = libirc_core.a -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/core \ -DSYSCONFDIR=\""$(sysconfdir)"\" \ diff --git a/src/irc/dcc/Makefile.am b/src/irc/dcc/Makefile.am index a2ca19e2..cf1e2ff5 100644 --- a/src/irc/dcc/Makefile.am +++ b/src/irc/dcc/Makefile.am @@ -1,6 +1,6 @@ noinst_LIBRARIES = libirc_dcc.a -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/core/ \ -I$(top_srcdir)/src/irc/core/ \ diff --git a/src/irc/flood/Makefile.am b/src/irc/flood/Makefile.am index a5ba65b0..1c4d786a 100644 --- a/src/irc/flood/Makefile.am +++ b/src/irc/flood/Makefile.am @@ -1,6 +1,6 @@ noinst_LIBRARIES = libirc_flood.a -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/core/ \ -I$(top_srcdir)/src/irc/core/ \ diff --git a/src/irc/notifylist/Makefile.am b/src/irc/notifylist/Makefile.am index c4a7f4a0..abd9d18d 100644 --- a/src/irc/notifylist/Makefile.am +++ b/src/irc/notifylist/Makefile.am @@ -1,6 +1,6 @@ noinst_LIBRARIES = libirc_notifylist.a -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/core/ \ -I$(top_srcdir)/src/irc/core/ \ diff --git a/src/irc/proxy/Makefile.am b/src/irc/proxy/Makefile.am index 8a5b5046..4eb73bb8 100644 --- a/src/irc/proxy/Makefile.am +++ b/src/irc/proxy/Makefile.am @@ -1,7 +1,7 @@ moduledir = $(libdir)/irssi/modules module_LTLIBRARIES = libirc_proxy.la -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/core/ \ -I$(top_srcdir)/src/irc/core/ \ diff --git a/src/lib-config/Makefile.am b/src/lib-config/Makefile.am index 4831ae66..06c7787c 100644 --- a/src/lib-config/Makefile.am +++ b/src/lib-config/Makefile.am @@ -1,6 +1,6 @@ noinst_LIBRARIES = libirssi_config.a -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/src \ $(GLIB_CFLAGS) diff --git a/src/perl/Makefile.am b/src/perl/Makefile.am index 909f4a81..a09c49a5 100644 --- a/src/perl/Makefile.am +++ b/src/perl/Makefile.am @@ -14,7 +14,7 @@ libfe_perl_la_LDFLAGS = -module -avoid-version -rpath $(moduledir) perl-core.lo: irssi-core.pl.h perl-signals.lo: perl-signals-list.h -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/core \ -I$(top_srcdir)/src/fe-common/core \ 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; diff --git a/src/perl/perl-common.c b/src/perl/perl-common.c index c5037ba6..1fbd000b 100644 --- a/src/perl/perl-common.c +++ b/src/perl/perl-common.c @@ -249,9 +249,9 @@ void irssi_callXS(void (*subaddr)(pTHX_ CV* cv), CV *cv, SV **mark) dSP; PUSHMARK(mark); - (*subaddr)(aTHX_ cv); - PUTBACK; + + (*subaddr)(aTHX_ cv); } void perl_chatnet_fill_hash(HV *hv, CHATNET_REC *chatnet) diff --git a/src/perl/perl-core.c b/src/perl/perl-core.c index ee0c845e..eb1bddee 100644 --- a/src/perl/perl-core.c +++ b/src/perl/perl-core.c @@ -59,9 +59,6 @@ static void perl_script_destroy_package(PERL_SCRIPT_REC *script) perl_call_pv("Irssi::Core::destroy", G_VOID|G_EVAL|G_DISCARD); - SPAGAIN; - - PUTBACK; FREETMPS; LEAVE; } @@ -218,8 +215,6 @@ static int perl_script_eval(PERL_SCRIPT_REC *script) { dSP; char *error; - int retcount; - SV *ret; ENTER; SAVETMPS; @@ -230,10 +225,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 +240,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; diff --git a/src/perl/perl-signals.c b/src/perl/perl-signals.c index d0670ba2..be4a9a5d 100644 --- a/src/perl/perl-signals.c +++ b/src/perl/perl-signals.c @@ -345,7 +345,6 @@ static void perl_call_signal(PERL_SCRIPT_REC *script, SV *func, } } - PUTBACK; FREETMPS; LEAVE; } diff --git a/src/perl/perl-sources.c b/src/perl/perl-sources.c index 33fe6dd1..0b49a608 100644 --- a/src/perl/perl-sources.c +++ b/src/perl/perl-sources.c @@ -69,7 +69,6 @@ static void perl_source_destroy(PERL_SOURCE_REC *rec) static int perl_source_event(PERL_SOURCE_REC *rec) { dSP; - int retcount; ENTER; SAVETMPS; @@ -79,8 +78,7 @@ static int perl_source_event(PERL_SOURCE_REC *rec) PUTBACK; perl_source_ref(rec); - retcount = perl_call_sv(rec->func, G_EVAL|G_SCALAR); - SPAGAIN; + perl_call_sv(rec->func, G_EVAL|G_DISCARD); if (SvTRUE(ERRSV)) { char *error = g_strdup(SvPV_nolen(ERRSV)); @@ -91,7 +89,6 @@ static int perl_source_event(PERL_SOURCE_REC *rec) if (perl_source_unref(rec) && rec->once) perl_source_destroy(rec); - PUTBACK; FREETMPS; LEAVE; diff --git a/src/perl/textui/Statusbar.xs b/src/perl/textui/Statusbar.xs index d1241ae1..d904ae9f 100644 --- a/src/perl/textui/Statusbar.xs +++ b/src/perl/textui/Statusbar.xs @@ -90,7 +90,6 @@ static void perl_statusbar_event(char *function, SBAR_ITEM_REC *item, } } - PUTBACK; FREETMPS; LEAVE; } |