suspicious pointer/integer coersion

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: suspicious pointer/integer coersion
Date: 2005-07-10 19:40:50
Message-ID: 42D179C2.5040302@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-07-10 20:11:02 Re: suspicious pointer/integer coersion
Previous Message Bruce Momjian 2005-07-10 18:33:06 Re: latest pgcrypto patches cause compile errors