LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: Patrick Dupre Date: Mon Feb 8 14:44:28 2010 Subject: Re: piddle in hash
On Sun, 7 Feb 2010, Patrick Dupre wrote: > Hello, > > I have been unsuccessful in getting the piddle values when I store them > in a hash so, I am asking to the list. > This works OK: > test_pdl (array) > pdl *array > CODE: > PDL -> converttype (&array, PDL_D, 1) ; Sorry, I finally I know how to do it. I need to do INT2PTR Sorry for the disturbing. > > when I do: test_pdl ($piddle) ; > > > but when I do: > %hash {"A"} = $piddle ; > test_pdl (\%hash) ; > > and > test_h (hash) > HV *hash > HE *he ; > pdl *p_pdl ; > CODE: > if (hv_exists_ent (hash, "A", 0)) { > he = hv_fetch_ent (hash, "A", 0, FALSE) ; > if (he) { > if (SvTYPE (HeVAL (he)) == SVt_RV) { > p_pdl = (pdl*) newRV_inc (SvRV (HeVAL (he))) ; > or > p_pdl = (pdl*) SvRV (HeVAL (he)) ; > PDL -> converttype (&p_pdl, PDL_D, 1) ; > } > } > } > > > What would the way of doing ? > Thank for your help. > > > --- > ========================================================================== > 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: pd520@york.ac.uk > ========================================================================== > -- --- ========================================================================== 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: pd520@york.ac.uk ==========================================================================
| Navigate in group perl.beginners at sever nntp.perl.org | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by Zareef Ahmed
Powered By PHP Consultants |