summaryrefslogtreecommitdiff
path: root/embed.fnc
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-09-23 23:47:57 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-09-24 08:50:30 -0700
commitca82605123510c943557b181da9bd0ddd3313665 (patch)
tree5e52128fd44454d50f40c6d16c089a762fa6cac5 /embed.fnc
parent432d4561c48cd74f3299eddc270a890908a4512e (diff)
downloadperl-ca82605123510c943557b181da9bd0ddd3313665.tar.gz
[perl #97958] Make reset "" match its docs
According to the documentation, reset() with no argument resets pat- terns. But reset "" and reset "\0foo" were also resetting patterns. While I was at it, I fixed embedded nulls, too, though it’s not likely anyone is using this. I could not fix the bug within the existing API for sv_reset, so I created a new function and left the old one with the old behaviour. Call me pear-annoyed.
Diffstat (limited to 'embed.fnc')
-rw-r--r--embed.fnc2
1 files changed, 2 insertions, 0 deletions
diff --git a/embed.fnc b/embed.fnc
index 8b03b25982..8aa3efbe59 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1334,6 +1334,8 @@ pd |SV* |sv_ref |NULLOK SV *dst|NN const SV *const sv|const int ob
Apd |void |sv_replace |NN SV *const sv|NN SV *const nsv
Apd |void |sv_report_used
Apd |void |sv_reset |NN const char* s|NULLOK HV *const stash
+p |void |sv_resetpvn |NULLOK const char* s|STRLEN len \
+ |NULLOK HV *const stash
Afpd |void |sv_setpvf |NN SV *const sv|NN const char *const pat|...
Apd |void |sv_vsetpvf |NN SV *const sv|NN const char *const pat|NULLOK va_list *const args
Apd |void |sv_setiv |NN SV *const sv|const IV num