summaryrefslogtreecommitdiff
path: root/embed.h
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2002-01-18 22:11:42 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2002-01-18 22:11:42 +0000
commit92110913508b9944d111285d9488f2f7b604919c (patch)
tree5328e9981561128fdf2360147fbe0315dca970e1 /embed.h
parenta398d936ece03108233d87a6ab0b552b6272270a (diff)
downloadperl-92110913508b9944d111285d9488f2f7b604919c.tar.gz
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-id: //depot/perlio@14335
Diffstat (limited to 'embed.h')
-rw-r--r--embed.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/embed.h b/embed.h
index bbae4f1e70..a2fbb67052 100644
--- a/embed.h
+++ b/embed.h
@@ -688,6 +688,7 @@
#define sv_len Perl_sv_len
#define sv_len_utf8 Perl_sv_len_utf8
#define sv_magic Perl_sv_magic
+#define sv_magicext Perl_sv_magicext
#define sv_mortalcopy Perl_sv_mortalcopy
#define sv_newmortal Perl_sv_newmortal
#define sv_newref Perl_sv_newref
@@ -2239,6 +2240,7 @@
#define sv_len(a) Perl_sv_len(aTHX_ a)
#define sv_len_utf8(a) Perl_sv_len_utf8(aTHX_ a)
#define sv_magic(a,b,c,d,e) Perl_sv_magic(aTHX_ a,b,c,d,e)
+#define sv_magicext(a,b,c,d,e,f) Perl_sv_magicext(aTHX_ a,b,c,d,e,f)
#define sv_mortalcopy(a) Perl_sv_mortalcopy(aTHX_ a)
#define sv_newmortal() Perl_sv_newmortal(aTHX)
#define sv_newref(a) Perl_sv_newref(aTHX_ a)