]> git.vpit.fr Git - perl/modules/Variable-Magic.git/commitdiff
Move vmg_clone() upwards
authorVincent Pit <vince@profvince.com>
Sat, 20 Sep 2008 22:35:07 +0000 (00:35 +0200)
committerVincent Pit <vince@profvince.com>
Sat, 20 Sep 2008 22:35:07 +0000 (00:35 +0200)
Magic.xs

index b62d5f7b116b8b6766707cbcd1d0c6be9f74c146..b4ff2439b9d5ef70f8e6bd567c6d82c1f77b5360 100644 (file)
--- a/Magic.xs
+++ b/Magic.xs
 # define MY_CXT_CLONE NOOP
 #endif
 
+#if VMG_MULTIPLICITY
+
+STATIC SV *vmg_clone(pTHX_ SV *sv, tTHX owner) {
+#define vmg_clone(P, O) vmg_clone(aTHX_ (P), (O))
+ CLONE_PARAMS param;
+ param.stashes    = NULL; /* don't need it unless sv is a PVHV */
+ param.flags      = 0;
+ param.proto_perl = owner;
+ return sv_dup(sv, &param);
+}
+
+#endif /* VMG_MULTIPLICITY */
+
 /* --- Compatibility ------------------------------------------------------- */
 
 #ifndef Newx
@@ -775,15 +788,6 @@ STATIC SV *vmg_wizard_wiz(pTHX_ SV *wiz) {
 
 #if VMG_MULTIPLICITY
 
-STATIC SV *vmg_clone(pTHX_ SV *sv, tTHX owner) {
-#define vmg_clone(P, O) vmg_clone(aTHX_ (P), (O))
- CLONE_PARAMS param;
- param.stashes    = NULL; /* don't need it unless sv is a PVHV */
- param.flags      = 0;
- param.proto_perl = owner;
- return sv_dup(sv, &param);
-}
-
 #define VMG_CLONE_CB(N) \
  z->cb_ ## N = (w->cb_ ## N) ? newRV_noinc(vmg_clone(SvRV(w->cb_ ## N), \
                                            w->owner))                   \