Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Review of patch to avoid adding magic with rvalue $#a (XS gurus wanted)

by Herkum (Parson)
on Oct 26, 2009 at 16:07 UTC ( [id://803304]=note: print w/replies, xml ) Need Help??


in reply to Review of patch to avoid adding magic with rvalue $#a (XS gurus wanted)

I have been watching this question and hoping someone one respond with an answer on the subject so that I could get more insight. This is a relatively simple question and it has not received a response.

I think that this question points out one of the weaknesses of Perl. XS is poorly documented/explained so there are few people who are able to be subject matter experts. I really wish that XS was more accessible so that more people could get involved on the subject.

  • Comment on Re: Review of patch to avoid adding magic with rvalue $#a (XS gurus wanted)

Replies are listed 'Best First'.
Re^2: Review of patch to avoid adding magic with rvalue $#a (XS gurus wanted)
by ikegami (Patriarch) on Oct 26, 2009 at 16:33 UTC

    My questions aren't really XS questions.

    The question about the var declaration is a C portability question.

    Whether the arg is guaranteed to be an AV or not has nothing to do with XS. It relates to the argument of an internal function that's only called internally.

    The question about sv_2mortal is an elementary XS question, and it is documented. ("They are made mortal so that once the values are copied by the calling program, the SV's that held the returned values can be deallocated. If they were not mortal, then they would continue to exist after the XSUB routine returned, but would not be accessible. This is a memory leak.") My question was more along the lines of "does that apply to operators as well"? Of course, the answer is yes.

    Finally, the question about dTARGET is specific to functions that implement perl opcodes. (For XS, you'd add dXSTARG; to make it work.) I'll grant you that Perl's internals aren't fully documented.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://803304]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2024-04-23 10:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found