Make an XS sub that returns a reference and wrap it with a perl lvalue sub.
In reply to Re: lvalue XS subs by ambrus in thread lvalue XS subs by ikegami