From 7d0af0013354c7cef56a76add55585812f07f5da Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 28 Apr 2002 13:24:27 +0000 Subject: [PATCH] perl hash length fixes, they're also automatically checked now in autogen.sh (by peder) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2736 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- autogen.sh | 3 +++ src/perl/irc/Irc.xs | 2 +- src/perl/perl-common.c | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/autogen.sh b/autogen.sh index 5255ff1c..db906c2d 100755 --- a/autogen.sh +++ b/autogen.sh @@ -145,3 +145,6 @@ if test x$NOCONFIGURE = x; then else echo Skipping configure process. fi + +# make sure perl hashes have correct length +find src/perl -name *.c -o -name *.xs | xargs grep -n hv_store | perl -ne 'if (/"(\w+)",\s*(\d+)/) { print unless $2 == length $1 }' diff --git a/src/perl/irc/Irc.xs b/src/perl/irc/Irc.xs index b0588cec..e5a662a4 100644 --- a/src/perl/irc/Irc.xs +++ b/src/perl/irc/Irc.xs @@ -106,7 +106,7 @@ static void perl_netsplit_fill_hash(HV *hv, NETSPLIT_REC *netsplit) av_push(av, plain_bless(tmp->data, "Irssi::Irc::Netsplitchannel")); } - hv_store(hv, "channels", 7, newRV_noinc((SV*)av), 0); + hv_store(hv, "channels", 8, newRV_noinc((SV*)av), 0); } static void perl_netsplit_server_fill_hash(HV *hv, NETSPLIT_SERVER_REC *rec) diff --git a/src/perl/perl-common.c b/src/perl/perl-common.c index c5c5175a..72fc557c 100644 --- a/src/perl/perl-common.c +++ b/src/perl/perl-common.c @@ -330,7 +330,7 @@ void perl_window_item_fill_hash(HV *hv, WI_ITEM_REC *item) hv_store(hv, "createtime", 10, newSViv(item->createtime), 0); hv_store(hv, "data_level", 10, newSViv(item->data_level), 0); - hv_store(hv, "hilight_color", 10, new_pv(item->hilight_color), 0); + hv_store(hv, "hilight_color", 13, new_pv(item->hilight_color), 0); } void perl_channel_fill_hash(HV *hv, CHANNEL_REC *channel) @@ -426,7 +426,7 @@ static void perl_ignore_fill_hash(HV *hv, IGNORE_REC *ignore) hv_store(hv, "level", 5, newSViv(ignore->level), 0); - hv_store(hv, "exception", 6, newSViv(ignore->exception), 0); + hv_store(hv, "exception", 9, newSViv(ignore->exception), 0); hv_store(hv, "regexp", 6, newSViv(ignore->regexp), 0); hv_store(hv, "fullword", 8, newSViv(ignore->fullword), 0); }