This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Need const versions of SvPV(), so that its callers can indicate
authorNicholas Clark <nick@ccl4.org>
Tue, 7 Jun 2005 12:00:09 +0000 (12:00 +0000)
committerNicholas Clark <nick@ccl4.org>
Tue, 7 Jun 2005 12:00:09 +0000 (12:00 +0000)
commit32a5c6ec9b6aa5a47138e7f9483825d52ab4b848
tree90da2ed7144df8888c508e779c65e11078a7c3f8
parent8a064bd6d0d7a44f3e80bed959e1dc566b57850d
Need const versions of SvPV(), so that its callers can indicate
whether they are read/write or read only
Also provide a mutable version, for the internals to use where it
needs a non-const pointer, but will be writing. Callers of this are
assumed to be aware of how copy on write is working, and to keep
track of core changes.

For now check that SVs are not READONLY when const versions are used.
(with DEBUG_COW > 1). COW is going to have to be orthogonal to Perl's
READONLY flag, but for now it provides a good test indicator.

p4raw-id: //depot/perl@24721
sv.h