[win32] fix typo in sv.h, and run 'make regen_headers' to make it build
Gurusamy Sarathy [Sat, 28 Feb 1998 22:16:45 +0000 (22:16 +0000)]
p4raw-id: //depot/win32/perl@605

embedvar.h
sv.h

index d11686c..bfc39d5 100644 (file)
 #define sv_no                  (Perl_Vars.Gsv_no)
 #define sv_undef               (Perl_Vars.Gsv_undef)
 #define sv_yes                 (Perl_Vars.Gsv_yes)
+#define svref_mutex            (Perl_Vars.Gsvref_mutex)
 #define thisexpr               (Perl_Vars.Gthisexpr)
 #define thr_key                        (Perl_Vars.Gthr_key)
 #define threads_mutex          (Perl_Vars.Gthreads_mutex)
 #define Gsv_no                 sv_no
 #define Gsv_undef              sv_undef
 #define Gsv_yes                        sv_yes
+#define Gsvref_mutex           svref_mutex
 #define Gthisexpr              thisexpr
 #define Gthr_key               thr_key
 #define Gthreads_mutex         threads_mutex
 #define sv_no                  Perl_sv_no
 #define sv_undef               Perl_sv_undef
 #define sv_yes                 Perl_sv_yes
+#define svref_mutex            Perl_svref_mutex
 #define thisexpr               Perl_thisexpr
 #define thr_key                        Perl_thr_key
 #define threads_mutex          Perl_threads_mutex
diff --git a/sv.h b/sv.h
index e9614e6..0b3adea 100644 (file)
--- a/sv.h
+++ b/sv.h
@@ -84,10 +84,10 @@ struct io {
        ++count;                                \
        MUTEX_UNLOCK(&svref_mutex);             \
      } STMT_END
-#    define ATOMIC_DEC_AND_TEST(res,count)     \
-       MUTEX_LOCK(&svref_mutex);               \
-       res = (--count == 0);                   \
-       MUTEX_UNLOCK(&svref_mutex);             \
+#    define ATOMIC_DEC_AND_TEST(res,count) STMT_START {        \
+       MUTEX_LOCK(&svref_mutex);                       \
+       res = (--count == 0);                           \
+       MUTEX_UNLOCK(&svref_mutex);                     \
      } STMT_END
 #  else
 #    define ATOMIC_INC(count) atomic_inc(&count)