]> git.vpit.fr Git - perl/modules/Scope-Upper.git/blobdiff - Upper.xs
Version requirements overhaul
[perl/modules/Scope-Upper.git] / Upper.xs
index 259d2fc9a0d907bb29afab6da8992c3f1277e42e..63d267b928aeb3c3a059d464001ac61d71bbb030 100644 (file)
--- a/Upper.xs
+++ b/Upper.xs
@@ -322,30 +322,32 @@ typedef struct {
 #define SU_UPLEVEL_HIJACKS_RUNOPS SU_HAS_PERL(5, 8, 0)
 
 typedef struct {
- void *next;
+ void          *next;
 
I32  cxix;
bool died;
su_uid_storage tmp_uid_storage;
su_uid_storage old_uid_storage;
 
- CV  *target;
- I32  target_depth;
+ I32            cxix;
 
CV  *callback;
- CV  *renamed;
I32            target_depth;
+ CV            *target;
 
- PERL_SI *si;
- PERL_SI *old_curstackinfo;
- AV      *old_mainstack;
+ CV            *callback;
+ CV            *renamed;
 
- COP *old_curcop;
+ PERL_SI       *si;
+ PERL_SI       *old_curstackinfo;
+ AV            *old_mainstack;
 
+ COP           *old_curcop;
+
+ OP            *old_op;
 #if SU_UPLEVEL_HIJACKS_RUNOPS
  runops_proc_t  old_runops;
 #endif
  bool           old_catch;
- OP            *old_op;
 
su_uid_storage new_uid_storage, old_uid_storage;
bool           died;
 } su_uplevel_ud;
 
 STATIC su_uplevel_ud *su_uplevel_ud_new(pTHX) {
@@ -356,9 +358,9 @@ STATIC su_uplevel_ud *su_uplevel_ud_new(pTHX) {
  Newx(sud, 1, su_uplevel_ud);
  sud->next = NULL;
 
- sud->new_uid_storage.map   = NULL;
- sud->new_uid_storage.used  = 0;
- sud->new_uid_storage.alloc = 0;
+ sud->tmp_uid_storage.map   = NULL;
+ sud->tmp_uid_storage.used  = 0;
+ sud->tmp_uid_storage.alloc = 0;
 
  Newx(si, 1, PERL_SI);
  si->si_stack   = newAV();
@@ -379,9 +381,9 @@ STATIC void su_uplevel_ud_delete(pTHX_ su_uplevel_ud *sud) {
  SvREFCNT_dec(si->si_stack);
  Safefree(si);
 
- if (sud->new_uid_storage.map) {
-  su_uid **map   = sud->new_uid_storage.map;
-  STRLEN   alloc = sud->new_uid_storage.alloc;
+ if (sud->tmp_uid_storage.map) {
+  su_uid **map   = sud->tmp_uid_storage.map;
+  STRLEN   alloc = sud->tmp_uid_storage.alloc;
   STRLEN   i;
 
   for (i = 0; i < alloc; ++i)
@@ -1132,9 +1134,9 @@ STATIC su_uplevel_ud *su_uplevel_storage_new(pTHX_ I32 cxix) {
  MY_CXT.uplevel_storage.top = sud;
 
  depth = su_uid_depth(cxix);
- su_uid_storage_dup(&sud->new_uid_storage, &MY_CXT.uid_storage, depth);
+ su_uid_storage_dup(&sud->tmp_uid_storage, &MY_CXT.uid_storage, depth);
  sud->old_uid_storage = MY_CXT.uid_storage;
- MY_CXT.uid_storage   = sud->new_uid_storage;
+ MY_CXT.uid_storage   = sud->tmp_uid_storage;
 
  return sud;
 }
@@ -1143,13 +1145,13 @@ STATIC void su_uplevel_storage_delete(pTHX_ su_uplevel_ud *sud) {
 #define su_uplevel_storage_delete(S) su_uplevel_storage_delete(aTHX_ (S))
  dMY_CXT;
 
- sud->new_uid_storage = MY_CXT.uid_storage;
+ sud->tmp_uid_storage = MY_CXT.uid_storage;
  MY_CXT.uid_storage   = sud->old_uid_storage;
  {
   su_uid **map;
   UV  i, alloc;
-  map   = sud->new_uid_storage.map;
-  alloc = sud->new_uid_storage.alloc;
+  map   = sud->tmp_uid_storage.map;
+  alloc = sud->tmp_uid_storage.alloc;
   for (i = 0; i < alloc; ++i) {
    if (map[i])
     map[i]->flags &= SU_UID_ACTIVE;
@@ -1398,7 +1400,7 @@ found_it:
  {
   dMY_CXT;
 
-  sud->new_uid_storage = MY_CXT.uid_storage;
+  sud->tmp_uid_storage = MY_CXT.uid_storage;
   MY_CXT.uid_storage   = sud->old_uid_storage;
 
   MY_CXT.uplevel_storage.top  = sud->next;