On Wed, Sep 12, 2012 at 11:55 PM, David Mertens
<[email protected]> wrote:
>
> At any rate, if a slice gets modified by PDL::PP code, there is
> machinery to flow those changes both to the slice's parent and to any
> of the slice's children. I had assumed that the data-flow machinery
> behind the $P() macro access in PDL::PP was the same as the stuff
> behind upd_data, just as you had, but clearly we were both wrong. This
> smells like a bug to me and something worth investigating whenever
> core diving happens.

This is covered in the PDL::API docs.  As mentioned
previously in this thread,  get_dataref and upd_data are
used to access/move piddle data to/from perl routines.

get_dataref gives you a reference to a perl scalar value
containing the data in the piddle.

upd_data updates the data pointer in the pdl struct to
match the associated SV (since manipulation at the
perl level could result in memory re-allocations).

If there is some clarification that could be added to the
docs or the book to avoid this confusion going forward,
please do so.  It should be unambiguous where the
perl world stops and the PDL::PP one begins.  :-)

--Chris

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to