"Philippe M. Chiasson" <[EMAIL PROTECTED]> writes:

> Looks good, I am going to give it a spin shortly. Only one note
> after looking over this patch. I'd keep the definition of
> mpxs_pool_account_t at the top
> 
> typedef struct {
>      SV *sv;
> #ifdef USE_ITHREADS
>      PerlInterpreter *perl;
>      modperl_interp_t *interp;
> #endif
> } mpxs_pool_account_t;
> 

+1.

[...]

> > +#define MP_APR_POOL_SV_DROPS_OWNERSHIP(acct) do {               \
> > +    dTHXa(acct->perl);                                          \
> > +    mg_free(acct->sv);                                          \
> > +    SvIVX(acct->sv) = 0;                                        \
> > +    if (modperl_opt_interp_unselect && acct->interp) {          \
> > +        /* this will decrement the interp refcnt until          \
> > +         * there are no more references, in which case          \
> > +         * the interpreter will be putback into the mip         \
> > +         */                                                     \
> > +        (void)modperl_opt_interp_unselect(acct->interp);        \
> > +    }                                                           \
> > +} while (0)
> > +
> > +
> > +#ifdef USE_ITHREADS

Oops- MP_APR_POOL_SV_DROPS_OWNERSHIP also needs to be inside an 

#ifdef USE_ITHREADS

because of the acct->interp call.  The non-ithreads version should 
probably look like this:

#define MP_APR_POOL_SV_DROPS_OWNERSHIP(acct) do {               \
    mg_free(acct->sv);                                          \
    SvIVX(acct->sv) = 0;                                        \
} while (0)


-- 
Joe Schaefer


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to