From 99a6a85b858b2bced34396b840770c005cacf3ee Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 19 Nov 2001 18:46:40 +0000 Subject: Chat protocol ID was assumed to be 8bit or less, this may not be so since the ID is taken from generic unique ID-pool which grows fast.. Now the we'll divide the 32bit number to 16bit chat protocol ID and 16bit object ID. They might not fit either, so I think I'll need to rewrite this part of code some day :) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2091 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/perl/perl-common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/perl/perl-common.c b/src/perl/perl-common.c index 946eb993..96961cd8 100644 --- a/src/perl/perl-common.c +++ b/src/perl/perl-common.c @@ -80,7 +80,7 @@ SV *irssi_bless_iobject(int type, int chat_type, void *object) HV *stash, *hv; rec = g_hash_table_lookup(iobject_stashes, - GINT_TO_POINTER(type | (chat_type << 24))); + GINT_TO_POINTER(type | (chat_type << 16))); if (rec == NULL) { /* unknown iobject */ return newSViv(GPOINTER_TO_INT(object)); @@ -144,7 +144,7 @@ void irssi_add_object(int type, int chat_type, const char *stash, PERL_OBJECT_REC *rec; void *hash; - hash = GINT_TO_POINTER(type | (chat_type << 24)); + hash = GINT_TO_POINTER(type | (chat_type << 16)); rec = g_hash_table_lookup(iobject_stashes, hash); if (rec == NULL) { rec = g_new(PERL_OBJECT_REC, 1); @@ -550,7 +550,7 @@ static void free_iobject_hash(void *key, PERL_OBJECT_REC *rec) static int free_iobject_proto(void *key, void *value, void *chat_type) { - if ((GPOINTER_TO_INT(key) >> 24) == GPOINTER_TO_INT(chat_type)) { + if ((GPOINTER_TO_INT(key) >> 16) == GPOINTER_TO_INT(chat_type)) { free_iobject_hash(key, value); return TRUE; } -- cgit v1.2.3