XS hoh

[email protected] (Patrick Dupre)
Newsgroups perl.xs
Message-ID <[email protected]>
Hello,

I am trying similar as in perl:
$HOH {A}{X}=a;
$HOH {B}{Y}=b;

but by using:

h_AB = newHV () ;
hoh = newHV () ;
hv_store (h_AB, "X", 1, newSVnv (a), 0) ;
hv_store (hoh, "A", 1, newRV_inc ((SV*) h_AB), 0) ;
hv_store (h_AB, "Y", 1, newSVnv (b), 0) ;
hv_store (hoh, "B", 1, newRV_inc ((SV*) h_AB), 0) ;


I get:
4 entries:
A, X
A, Y
B, X
B, Y

How can I avoid such a behavior ?

thanks

-- 
---
==========================================================================
  Patrick DUPRÉ                      |   |
  Department of Chemistry            |   |    Phone: (44)-(0)-1904-434384
  The University of York             |   |    Fax:   (44)-(0)-1904-432516
  Heslington                         |   |
  York YO10 5DD  United Kingdom      |   |    email: [email protected]
==========================================================================
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.