in reply to Re^8: XS: SvPVLV examples?
in thread XS: SvPVLV examples?

It does! That means that having only one extension type is not as limiting as it seems!

Actually, there are two. There is also uvar magic:

U PERL_MAGIC_uvar vtbl_uvar Available for use by ex +tensions

You can also chain multiple magics. See the description for SvPVMG in Perlguts:

moremagic is a pointer to another MAGIC and is used to form a single linked list of the MAGICs attached to an SV.

For my purposes, it is the lvalueness associated with PVLVs that is of most interest.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP PCW It is as I've been saying!(Audio until 20090817)

Replies are listed 'Best First'.
Re^10: XS: SvPVLV examples?
by ikegami (Patriarch) on Sep 25, 2009 at 04:05 UTC

    For my purposes, it is the lvalueness associated with PVLVs that is of most interest.

    All of magics with a setter in their vtable have lvalueness. There's nothing special about PERL_MAGIC_substr, and the use of PVLV is not a requirement.

    Note that returning a PVLV or something magical doesn't make your function an lvalue function. That's a compile-time determination indicated by the :lvalue attribute.

    Are you really asking about making an lvalue function?