]> git.vpit.fr Git - perl/modules/Variable-Magic.git/commitdiff
The magic signatures are no longer needed
authorVincent Pit <vince@profvince.com>
Wed, 26 Oct 2011 17:26:26 +0000 (19:26 +0200)
committerVincent Pit <vince@profvince.com>
Wed, 26 Oct 2011 17:26:26 +0000 (19:26 +0200)
Magic.xs
lib/Variable/Magic.pm

index 3c4cd3347faa74ceab8869d267110c38e91823d5..a0953322118835ea81b6b55eafd3fa20cf36431f 100644 (file)
--- a/Magic.xs
+++ b/Magic.xs
@@ -406,11 +406,6 @@ typedef struct {
 
 START_MY_CXT
 
 
 START_MY_CXT
 
-/* --- Signatures ---------------------------------------------------------- */
-
-#define SIG_WZO ((U16) (0x3891))
-#define SIG_WIZ ((U16) (0x3892))
-
 /* --- <vmg_vtable> structure ---------------------------------------------- */
 
 #if VMG_THREADSAFE
 /* --- <vmg_vtable> structure ---------------------------------------------- */
 
 #if VMG_THREADSAFE
@@ -644,7 +639,7 @@ STATIC SV *vmg_wizard_sv_new(pTHX_ const vmg_wizard *w) {
  if (w) {
   MAGIC *mg = sv_magicext(wiz, NULL, PERL_MAGIC_ext, &vmg_wizard_sv_vtbl,
                                      (const char *) w, 0);
  if (w) {
   MAGIC *mg = sv_magicext(wiz, NULL, PERL_MAGIC_ext, &vmg_wizard_sv_vtbl,
                                      (const char *) w, 0);
-  mg->mg_private = SIG_WZO;
+  mg->mg_private = 0;
 #if VMG_THREADSAFE
   mg->mg_flags  |= MGf_DUP;
 #endif
 #if VMG_THREADSAFE
   mg->mg_flags  |= MGf_DUP;
 #endif
@@ -789,7 +784,7 @@ STATIC UV vmg_cast(pTHX_ SV *sv, const vmg_wizard *w, const SV *wiz, SV **args,
  mg   = sv_magicext(sv, data, PERL_MAGIC_ext, vmg_vtable_vtbl(w->vtable),
                               (const char *) wiz, HEf_SVKEY);
  SvREFCNT_dec(data);
  mg   = sv_magicext(sv, data, PERL_MAGIC_ext, vmg_vtable_vtbl(w->vtable),
                               (const char *) wiz, HEf_SVKEY);
  SvREFCNT_dec(data);
- mg->mg_private = SIG_WIZ;
+ mg->mg_private = 0;
  if (w->cb_copy)
   mg->mg_flags |= MGf_COPY;
 #if 0
  if (w->cb_copy)
   mg->mg_flags |= MGf_COPY;
 #if 0
index af44f016b81d9bee12c84c54b4a8796940b28f88..01b1c7069223a53b2597aaf91cd542f71623832e 100644 (file)
@@ -196,9 +196,6 @@ This last one triggers when a key is deleted in the hash, regardless of whether
 
 You can refer to the tests to have more insight of where the different magics are invoked.
 
 
 You can refer to the tests to have more insight of where the different magics are invoked.
 
-To prevent any clash between different magics defined with this module, an unique numerical signature is attached to each kind of magic (i.e. each set of callbacks for magic operations).
-At the C level, magic tokens owned by magic created by this module have their C<< mg->mg_private >> field set to C<0x3891> or C<0x3892>, so please don't use these magic (sic) numbers in other extensions.
-
 =head1 FUNCTIONS
 
 =cut
 =head1 FUNCTIONS
 
 =cut