summaryrefslogtreecommitdiff
path: root/src/perl/perl-common.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-11-19 18:46:40 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-11-19 18:46:40 +0000
commit99a6a85b858b2bced34396b840770c005cacf3ee (patch)
tree4372cf9cdfba53aa472e99b52dcf5c146faed6de /src/perl/perl-common.c
parent381c823e1a00020085e0330b01253c307bc1fec2 (diff)
downloadirssi-99a6a85b858b2bced34396b840770c005cacf3ee.zip
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
Diffstat (limited to 'src/perl/perl-common.c')
-rw-r--r--src/perl/perl-common.c6
1 files 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;
}