summaryrefslogtreecommitdiff
path: root/embed.fnc
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-01-19 17:55:55 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-01-19 17:55:55 +0000
commit75828062e812267d86f47b1848dee6b0da376c2d (patch)
treec6601986f3f014efde9c9f938e8d09a7a7ef5638 /embed.fnc
parent326557bdc87e47c3b787d5b3eba0dc7fdc1bd63e (diff)
parent92110913508b9944d111285d9488f2f7b604919c (diff)
downloadperl-75828062e812267d86f47b1848dee6b0da376c2d.tar.gz
Integrate perlio:
[ 14335] Split out core of sv_magic() into sv_magicext(). sv_magic provides the extra restictions (no READONLY, only one of each type, canned set of vtables), and sv_magicext() does the actual data twiddling. Also enhances semantics of ->mg_ptr setting via name/namlen to allow either an uncopied ptr (namlen == 0), or a Newz()ed scratch area (namlen > 0 && name == NULL). sv_magicext also returns the MAGIC * it added. sv_magicext is intended mainly for PERL_MAGIC_ext (~) magic. To come sv_unmagicext() - which will remove just one magic of particular type, and additionaly match against ->mg_ptr, or the MAGIC * (need to experiment as to which is more natural). p4raw-link: @14335 on //depot/perlio: 92110913508b9944d111285d9488f2f7b604919c p4raw-id: //depot/perl@14346
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 2388e32257..cb5dcd4991 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -729,6 +729,8 @@ Apd |STRLEN |sv_len |SV* sv
Apd |STRLEN |sv_len_utf8 |SV* sv
Apd |void |sv_magic |SV* sv|SV* obj|int how|const char* name \
|I32 namlen
+Apd |MAGIC *|sv_magicext |SV* sv|SV* obj|int how|MGVTBL *vtbl \
+ | const char* name|I32 namlen
Apd |SV* |sv_mortalcopy |SV* oldsv
Apd |SV* |sv_newmortal
Apd |SV* |sv_newref |SV* sv