On Thu, 24 Jun 2004, Joe Schaefer wrote:

> Randy Kobes <[EMAIL PROTECTED]> writes:
>
> [...]
>
> > ==================================================================
> > #include "mod_perl.h"
> > #include "modperl_common_util.h"
> >
> > /* XXX: provide the missing symbol for APR::Pool as a tmp workaround  */
> > #ifndef modperl_interp_unselect
> > apr_status_t modperl_interp_unselect(modperl_interp_t *interp) {
>
>
> This has a different signature from the one in modperl_common_util.h,
> so you probably want
>
>     apr_status_t modperl_interp_unselect(void *data) {
>         modperl_interp_t *interp = data;
>
> [...]

That's a good point - here's a more complete implementation,
that also differentiates between USE_ITHREADS being defined
or not:
====================================================
Index: xs/APR/APR/APR.xs
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/APR/APR/APR.xs,v
retrieving revision 1.11
diff -u -r1.11 APR.xs
--- xs/APR/APR/APR.xs   16 Jun 2004 03:55:48 -0000      1.11
+++ xs/APR/APR/APR.xs   24 Jun 2004 17:09:57 -0000
@@ -18,8 +18,17 @@
 /* XXX: provide the missing symbol for APR::Pool as a tmp workaround  */
 #ifndef modperl_interp_unselect
 apr_status_t modperl_interp_unselect(void *data);
-apr_status_t modperl_interp_unselect(void *data) { return APR_SUCCESS; }
-#endif
+apr_status_t modperl_interp_unselect(void *data)
+{
+#ifdef USE_ITHREADS
+    modperl_interp_t *interp = (modperl_interp_t *)data;
+    if (interp->refcnt != 0) {
+        --interp->refcnt;
+    }
+#endif /* USE_ITHREADS */
+    return APR_SUCCESS;
+}
+#endif /* modperl_interp_unselect */

 #ifdef MP_HAVE_APR_LIBS
 #   define APR_initialize apr_initialize
================================================================

-- 
best regards,
randy

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

Reply via email to