John ORourke wrote:
Torsten wasn't changing the value pointed to by $ctx, he was changing $ctx - therefore it looks like pnotes actually stores a reference to the scalar you give it, instead of the actual scalar itself as the docs imply. So I'd say it's a doc bug, but I'd prefer pnotes to store the actual scalar instead.
You are correct.

from:
xs/Apache2/RequestUtil/Apache2__RequestUtil.h::
SV *mpxs_Apache2__RequestRec_pnotes(pTHX_ request_rec *r, SV *key, SV *val)

        ...
   retval = *hv_store(rcfg->pnotes, k, len,
                               SvREFCNT_inc(val), 0);
        ...

The reference count is being increment to val which is the value being passed in.

Feel free to submit a documentation patch that would alleviate
confusion.


--
------------------------------------------------------------------------
"Love is not the one you can picture yourself marrying,
but the one you can't picture the rest of your life without."

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

"I wanna hold ya till I die ... I wanna hold ya till the fear in me subsides."

Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

Reply via email to