You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by st...@apache.org on 2003/11/05 08:24:58 UTC
cvs commit: modperl-2.0/xs/APR/APR APR.xs
stas 2003/11/04 23:24:58
Modified: xs/APR/APR APR.xs
Log:
don't use fprintf with perl, since it redefines this function with
PerlIO_printf anyway, which requires aTHX, so use that function directly
and pass aTHX to it from XS.
Submitted by: Randy Kobes
Revision Changes Path
1.8 +5 -4 modperl-2.0/xs/APR/APR/APR.xs
Index: APR.xs
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/APR/APR/APR.xs,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -u -r1.7 -r1.8
--- APR.xs 25 Aug 2003 23:28:24 -0000 1.7
+++ APR.xs 5 Nov 2003 07:24:58 -0000 1.8
@@ -13,14 +13,15 @@
/* XXX: APR_initialize doesn't initialize apr_hook_global_pool, needed for
* work outside httpd, so do it manually PR22605 */
#include "apr_hooks.h"
-static void extra_apr_init(void)
+static void extra_apr_init(pTHX)
{
if (apr_hook_global_pool == NULL) {
apr_pool_t *global_pool;
apr_status_t rv = apr_pool_create(&global_pool, NULL);
if (rv != APR_SUCCESS) {
- fprintf(stderr, "Fatal error: unable to create global pool "
- "for use with by the scoreboard");
+ PerlIO_printf(PerlIO_stderr(),
+ "Fatal error: unable to create global pool "
+ "for use with by the scoreboard");
}
/* XXX: mutex locking? */
apr_hook_global_pool = global_pool;
@@ -37,7 +38,7 @@
BOOT:
file = file; /* -Wall */
APR_initialize();
- extra_apr_init();
+ extra_apr_init(aTHX);
void
END()