suspicious pointer/integer coersion - Mailing list pgsql-hackers

From Andrew Dunstan
Subject suspicious pointer/integer coersion
Date
Msg-id 42D179C2.5040302@dunslane.net
Whole thread Raw
Responses Re: suspicious pointer/integer coersion
List pgsql-hackers
I have just noticed this code in plperl.c:
       hv_store(plperl_proc_hash, internal_proname, proname_len,                newSViv((IV) prodesc), 0);

basically, here prodesc is a pointer to a struct, and we are storing it 
as an integer in a perl hash for easy lookup by stringified oid.

How safe is this conversion on 64 bit platforms?

cheers

andrew



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: latest pgcrypto patches cause compile errors
Next
From: Tom Lane
Date:
Subject: Re: suspicious pointer/integer coersion