in reply to Re^3: XS: returning a 64-bit unsigned int?
in thread XS: returning a 64-bit unsigned int?
There is a SvIsUV_on(sv)
Not in the docs I'm looking at. Where did you dig that one up from?
and you didn't handle magic. If it's just an internal scalar, you could get away with not doing those,
No, I never handle magic. It's not laziness but a design choice. The reason I drop into XS/I::C is for performance. There is no point in doing that if you then allow people to pass you arrays that are tied to disk, or scalars that use post-its as backing store :)
IMO the way perl handles magic in-line, is all wrong anyway. It imposes huge costs for something that is actually quite a rare event. It ought to be possible to make a single determination at the top of a routine and defer to a separate routine that handles magic when needed, thus leaving the main-line code free of such considerations. But that's another wish list item that it's far too late to consider at this point.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: XS: returning a 64-bit unsigned int?
by ikegami (Patriarch) on Sep 27, 2011 at 08:57 UTC | |
by BrowserUk (Patriarch) on Sep 27, 2011 at 09:21 UTC | |
by ikegami (Patriarch) on Sep 27, 2011 at 18:00 UTC | |
by BrowserUk (Patriarch) on Sep 27, 2011 at 18:09 UTC | |
by ikegami (Patriarch) on Sep 27, 2011 at 18:15 UTC | |
|