diff options
author | Timo Sirainen <cras@irssi.org> | 2002-10-28 01:49:14 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-10-28 01:49:14 +0000 |
commit | c764853132acad1c8cdde108e9187e47047d3362 (patch) | |
tree | 95adca208637cf78d91cb53858bbc9e780259578 /src | |
parent | 39fc0f5ea15a38cc22b7d53975584c5a79508148 (diff) | |
download | irssi-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')
-rw-r--r-- | src/perl/perl-common.c | 8 | ||||
-rw-r--r-- | src/perl/perl-signals.c | 2 |
2 files changed, 5 insertions, 5 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); diff --git a/src/perl/perl-signals.c b/src/perl/perl-signals.c index 3c423a64..6dcde221 100644 --- a/src/perl/perl-signals.c +++ b/src/perl/perl-signals.c @@ -97,7 +97,7 @@ static void perl_call_signal(PERL_SCRIPT_REC *script, SV *func, if (strcmp(rec->args[n], "string") == 0) perlarg = new_pv(arg); else if (strcmp(rec->args[n], "int") == 0) - perlarg = newSViv(GPOINTER_TO_INT(arg)); + perlarg = newSViv((IV)arg); else if (strcmp(rec->args[n], "ulongptr") == 0) perlarg = newSViv(*(unsigned long *) arg); else if (strcmp(rec->args[n], "intptr") == 0) |