summaryrefslogtreecommitdiff
path: root/embed.fnc
diff options
context:
space:
mode:
authorChip Salzenberg <chip@pobox.com>2012-06-22 15:18:18 -0700
committerChip Salzenberg <chip@pobox.com>2012-07-15 15:29:02 -0700
commit4bac9ae47b5ad7845a24e26b0e95609805de688a (patch)
tree3ec050044b0c6d7f3688cd9037e85d10c601eb78 /embed.fnc
parentb8a55fe78ae4ecc0a81a2d98dba9fead6df06efb (diff)
downloadperl-4bac9ae47b5ad7845a24e26b0e95609805de688a.tar.gz
Magic flags harmonization.
In restore_magic(), which is called after any magic processing, all of the public OK flags have been shifted into the private OK flags. Thus the lack of an appropriate public OK flags was used to trigger both get magic and required conversions. This scheme did not cover ROK, however, so all properly written code had to make sure mg_get was called the right number of times anyway. Meanwhile the private OK flags gained a second purpose of marking converted but non-authoritative values (e.g. the IV conversion of an NV), and the inadequate flag shift mechanic broke this in some cases. This patch removes the shift mechanic for magic flags, thus exposing (and fixing) some improper usage of magic SVs in which mg_get() was not called correctly. It also has the side effect of making magic get functions specifically set their SVs to undef if that is desired, as the new behavior of empty get functions is to leave the value unchanged. This is a feature, as now get magic that does not modify its value, e.g. tainting, does not have to be special cased. The changes to cpan/ here are only temporary, for development only, to keep blead working until upstream applies them (or something like them). Thanks to Rik and Father C for review input.
Diffstat (limited to 'embed.fnc')
-rw-r--r--embed.fnc7
1 files changed, 6 insertions, 1 deletions
diff --git a/embed.fnc b/embed.fnc
index eb81d9c168..0f19f7c58e 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1373,6 +1373,9 @@ Apd |void |sv_usepvn_flags|NN SV *const sv|NULLOK char* ptr|const STRLEN len\
Apd |void |sv_vcatpvfn |NN SV *const sv|NN const char *const pat|const STRLEN patlen \
|NULLOK va_list *const args|NULLOK SV **const svargs|const I32 svmax \
|NULLOK bool *const maybe_tainted
+Apd |void |sv_vcatpvfn_flags|NN SV *const sv|NN const char *const pat|const STRLEN patlen \
+ |NULLOK va_list *const args|NULLOK SV **const svargs|const I32 svmax \
+ |NULLOK bool *const maybe_tainted|const U32 flags
Apd |void |sv_vsetpvfn |NN SV *const sv|NN const char *const pat|const STRLEN patlen \
|NULLOK va_list *const args|NULLOK SV **const svargs \
|const I32 svmax|NULLOK bool *const maybe_tainted
@@ -2213,7 +2216,9 @@ Apd |void |sv_catsv_flags |NN SV *const dsv|NULLOK SV *const ssv|const I32 flags
Apmd |STRLEN |sv_utf8_upgrade_flags|NN SV *const sv|const I32 flags
Ap |STRLEN |sv_utf8_upgrade_flags_grow|NN SV *const sv|const I32 flags|STRLEN extra
Apd |char* |sv_pvn_force_flags|NN SV *const sv|NULLOK STRLEN *const lp|const I32 flags
-Apd |void |sv_copypv |NN SV *const dsv|NN SV *const ssv
+pmb |void |sv_copypv |NN SV *const dsv|NN SV *const ssv
+Apmd |void |sv_copypv_nomg |NN SV *const dsv|NN SV *const ssv
+Apd |void |sv_copypv_flags |NN SV *const dsv|NN SV *const ssv|const I32 flags
Ap |char* |my_atof2 |NN const char *s|NN NV* value
Apn |int |my_socketpair |int family|int type|int protocol|int fd[2]
Ap |int |my_dirfd |NULLOK DIR* dir