Discussion:
Access to actual SV data
(too old to reply)
a***@gmail.com
2006-02-09 17:44:45 UTC
Permalink
I am trying to be very efficient in pulling some DBI blob data back
into C. I have set up DBI to use bind_col, and this is very nice. But
once the read data is in an SV, I would like to get access to the
actual pointer to the data w/in the SV, and hand this back to C, so
that I don't have to move the data. The blob data is pure binary, not
string data. Which of the many SV routines is the right one to get
access to this pointer?

BTW, these blobs are huge, and copying them in memory is a preformance
penalty I don't want to incur.

TIA!
Nicholas Clark
2006-02-10 19:11:58 UTC
Permalink
Post by a***@gmail.com
I am trying to be very efficient in pulling some DBI blob data back
into C. I have set up DBI to use bind_col, and this is very nice. But
once the read data is in an SV, I would like to get access to the
actual pointer to the data w/in the SV, and hand this back to C, so
that I don't have to move the data. The blob data is pure binary, not
string data. Which of the many SV routines is the right one to get
access to this pointer?
Probably SvPV is what you're looking for. It gives you a pointer to the
string buffer of the SV, and the length of the data in the buffer.


Nicholas Clark

Loading...