in reply to Re: Why is sv_mortalcopy() non-const?
in thread Why is sv_mortalcopy() non-const?

Source changes to extensions shouldn't be an issue. You'd need to change functions that sv_mortalcopy() calls, but not functions that call sv_mortalcopy(), since conversion from SV* to const SV* is always fine.
  • Comment on Re: Re: Why is sv_mortalcopy() non-const?

Replies are listed 'Best First'.
Re: Re: Re: Why is sv_mortalcopy() non-const?
by Elian (Parson) on Jun 04, 2002 at 17:41 UTC
    It's not that easy. You change sv_mortalcopy (or other functions or macros) to take a const pointer, and you get a const pointer inside them. That means any place you pass it into needs to be changed to const, and pretty soon you ripple through a good chunk of the source. That's definitely got repercussions. (It doesn't help that perl's horribly incestuous with itself--there's a goodly number of routines that fiddle with bits that you wouldn't expect, which make const-ing them impossible)