Re: Major bug in Storable 2.03 with 5.6.1 (freeze & thaw hooks)
Radu Greab [Fri, 7 Jun 2002 05:17:58 +0000 (08:17 +0300)]
Message-ID: <15616.6102.89472.9852@ix.netsoft.ro>

p4raw-id: //depot/perl@17052

ext/Storable/Storable.xs

index 20bd7d7..625cdca 100644 (file)
@@ -351,14 +351,14 @@ typedef struct stcxt {
 
 #else /* !MULTIPLICITY && !PERL_OBJECT && !PERL_CAPI */
 
-static stcxt_t Context;
-static stcxt_t *Context_ptr = &Context;
+static stcxt_t *Context_ptr = NULL;
 #define dSTCXT                 stcxt_t *cxt = Context_ptr
+#define SET_STCXT(x)           Context_ptr = x
 #define INIT_STCXT                                             \
        dSTCXT;                                                         \
-       NEW_STORABLE_CXT_OBJ(cxt)
+       NEW_STORABLE_CXT_OBJ(cxt);                      \
+       SET_STCXT(cxt)
 
-#define SET_STCXT(x)           Context_ptr = x
 
 #endif /* MULTIPLICITY || PERL_OBJECT || PERL_CAPI */