summaryrefslogtreecommitdiff
path: root/src/perl/perl-common.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-10-28 01:49:14 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-10-28 01:49:14 +0000
commitc764853132acad1c8cdde108e9187e47047d3362 (patch)
tree95adca208637cf78d91cb53858bbc9e780259578 /src/perl/perl-common.c
parent39fc0f5ea15a38cc22b7d53975584c5a79508148 (diff)
downloadirssi-c764853132acad1c8cdde108e9187e47047d3362.zip
Cast pointers to IVs instead of using GPOINTER_TO_INT() which casts them to
ints. Hopefully fixes 64bit architectures. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2978 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl/perl-common.c')
-rw-r--r--src/perl/perl-common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/perl/perl-common.c b/src/perl/perl-common.c
index cad117fc..f7cd87da 100644
--- a/src/perl/perl-common.c
+++ b/src/perl/perl-common.c
@@ -106,13 +106,13 @@ SV *irssi_bless_iobject(int type, int chat_type, void *object)
GINT_TO_POINTER(type | (chat_type << 16)));
if (rec == NULL) {
/* unknown iobject */
- return newSViv(GPOINTER_TO_INT(object));
+ return newSViv((IV)object);
}
stash = gv_stashpv(rec->stash, 1);
hv = newHV();
- hv_store(hv, "_irssi", 6, newSViv(GPOINTER_TO_INT(object)), 0);
+ hv_store(hv, "_irssi", 6, newSViv((IV)object), 0);
rec->fill_func(hv, object);
return sv_bless(newRV_noinc((SV*)hv), stash);
}
@@ -125,7 +125,7 @@ SV *irssi_bless_plain(const char *stash, void *object)
fill_func = g_hash_table_lookup(plain_stashes, stash);
hv = newHV();
- hv_store(hv, "_irssi", 6, newSViv(GPOINTER_TO_INT(object)), 0);
+ hv_store(hv, "_irssi", 6, newSViv((IV)object), 0);
if (fill_func != NULL)
fill_func(hv, object);
return sv_bless(newRV_noinc((SV*)hv), gv_stashpv((char *)stash, 1));
@@ -298,7 +298,7 @@ void perl_server_fill_hash(HV *hv, SERVER_REC *server)
hv_store(hv, "connection_lost", 15, newSViv(server->connection_lost), 0);
stash = gv_stashpv("Irssi::Rawlog", 0);
- hv_store(hv, "rawlog", 6, sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(server->rawlog))), stash), 0);
+ hv_store(hv, "rawlog", 6, sv_bless(newRV_noinc(newSViv((IV)server->rawlog)), stash), 0);
hv_store(hv, "version", 7, new_pv(server->version), 0);
hv_store(hv, "away_reason", 11, new_pv(server->away_reason), 0);