From ff1d701a9066322781b4a42355089c63d9427ac9 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 6 Sep 2004 09:23:51 +0000 Subject: [PATCH] Use different check for existing Perl interpreter. Bug 128 --- recctrl/perlread.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/recctrl/perlread.c b/recctrl/perlread.c index c38203b..ca8dc15 100644 --- a/recctrl/perlread.c +++ b/recctrl/perlread.c @@ -1,4 +1,4 @@ -/* $Id: perlread.c,v 1.8.2.2 2004-09-03 10:36:26 adam Exp $ +/* $Id: perlread.c,v 1.8.2.3 2004-09-06 09:23:51 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps @@ -242,13 +242,9 @@ static void *grs_init_perl(void) /* If there is an interpreter (context) running, - we are calling indexing and retrieval from the perl API - we don't create a new one. */ -#if PERL_VERSION >= 8 - /* with Perl 5.8 context may be non-NULL even though it's not there! */ - context->origi = 0; -#else - context->origi = PERL_GET_CONTEXT; -#endif - if (context->origi == NULL) { + context->origi = PL_curinterp; + + if (!context->origi) { context->perli = perl_alloc(); PERL_SET_CONTEXT(context->perli); logf (LOG_LOG, "Initializing new perl interpreter context (%p)",context->perli); -- 1.7.10.4