Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^9: XS: EXTEND/mPUSHi

by ikegami (Pope)
on Sep 27, 2011 at 07:43 UTC ( #928038=note: print w/ replies, xml ) Need Help??


in reply to Re^8: XS: EXTEND/mPUSHi
in thread XS: EXTEND/mPUSHi

The doing it twice is not a problem. Compilers will just get rid of the dead code. There's unreachable code every time you end an XS function using XSRETURN and the likes. That can't be that rare (especially XSRETURN_YES to return true), and it's got nothing to do with Inline::C.

If you had look at the .xs instead of the .c, you can't even tell there's duplication.

The problem is that Inline::C differs from XS. In XS, one doesn't call PUTBACK. In Inline::C, one must. In XS, the args are poped for you. In Inline::C, one must do so. Is this documented? Don't know. But even if it is, it's confusing and error prone.


Comment on Re^9: XS: EXTEND/mPUSHi

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2014-12-27 05:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls