New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove the requirement for null termination on PVs #15354
Comments
From @cpansproutIf we could remove the requirement that PVs in SVs have a terminating null, we could make things like substr() faster (by having it use the same string buffer as the full original string). Since it is not uncommon in XS code to pass SvPV(...) to a system function that expects null termination, we would probably have to make SvPV allocate a new string with the null, and introduce a new version of SvPV (SvPV_nn_ok(sv,len)?) that may return unterminated strings and assumes the caller will depend solely on the len value. Of course, any code that passes SvPVX to a C function will probably break. I don’t know whether there is any way to avoid that. A survey of SvPVX uses on CPAN would be time-consuming, but helpful. -- Father Chrysostomos |
From @iabynOn Mon, May 23, 2016 at 04:51:29PM -0700, Father Chrysostomos wrote:
SvPV* are used 1000+ times in the main *.c perl core. All those uses would According to http://grep.cpan.me, excluding ppport.h etc, 163 That's a lot of breakage, inefficiency, or fixups. -- |
The RT System itself - Status changed from 'new' to 'open' |
From @cpansproutOn Tue Jun 21 08:44:13 2016, davem wrote:
So it’s probably less useful than making the stack hold reference counts. :-) -- Father Chrysostomos |
Migrated from rt.perl.org#128226 (status was 'open')
Searchable as RT128226$
The text was updated successfully, but these errors were encountered: