summaryrefslogtreecommitdiff
path: root/proto.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
commitf911d4aaf5e815ff529ac0a0732b2da5c7f95aed (patch)
tree5328e9981561128fdf2360147fbe0315dca970e1 /proto.h
parentdb5d0b5d71dc5c10719973c0e599bcb74d275dbe (diff)
downloadperl-f911d4aaf5e815ff529ac0a0732b2da5c7f95aed.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 'proto.h')
-rw-r--r--proto.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/proto.h b/proto.h
index fc67d8eafa..b93bb2c525 100644
--- a/proto.h
+++ b/proto.h
@@ -758,6 +758,7 @@ PERL_CALLCONV int Perl_sv_isobject(pTHX_ SV* sv);
PERL_CALLCONV STRLEN Perl_sv_len(pTHX_ SV* sv);
PERL_CALLCONV STRLEN Perl_sv_len_utf8(pTHX_ SV* sv);
PERL_CALLCONV void Perl_sv_magic(pTHX_ SV* sv, SV* obj, int how, const char* name, I32 namlen);
+PERL_CALLCONV MAGIC * Perl_sv_magicext(pTHX_ SV* sv, SV* obj, int how, MGVTBL *vtbl, const char* name, I32 namlen );
PERL_CALLCONV SV* Perl_sv_mortalcopy(pTHX_ SV* oldsv);
PERL_CALLCONV SV* Perl_sv_newmortal(pTHX);
PERL_CALLCONV SV* Perl_sv_newref(pTHX_ SV* sv);