From: Adam Dickmeiss Date: Mon, 6 Sep 2004 09:23:51 +0000 (+0000) Subject: Use different check for existing Perl interpreter. Bug 128 X-Git-Tag: ZEBRA.1.3.20~47 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=ff1d701a9066322781b4a42355089c63d9427ac9;p=idzebra-moved-to-github.git Use different check for existing Perl interpreter. Bug 128 --- 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);