[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: win32 perl backend (ITS#1827)



Kurt Zeilenga wrote:
> My reviewer indicated to me that current HEAD code addresses this issue
> and this patch is not needed.  Please indicate whether or not you
> believe the patch is needed.
> 
> Kurt
> 

 From the win32 side, yes.

The patch removes the XSUB.h inclusion in bind.c and init.c.  It's not 
needed in those files and causes compile errors.  XSUB.h, AFAIK, is 
needed only in perl modules, ie. using C API in perl through modules, 
eg. perldap module, and the ldapperl ( http://ldap.sourceforge.net ) 
module I'm working on.  But we're using perl in C, the other way around.

The second change...

#ifdef HAVE_WIN32_ASPERL
         PERL_SET_CONTEXT( PERL_INTERPRETER );
#endif

is needed with newer configurations of perl, as of 5.6.1 I believe, that 
are built with MULTIPLICITY support, along with some other context flags 
( I can't remember off the top of head, but I can find out the exact 
flags ).  Result is that before the perl interpreter is used for the 
first time in a thread, the PERL_SET_CONTEXT function must be called to 
setup globals.  This function must be called before any other perl 
functions in any thread that did not create the interpreter, or the user 
gets a heap error at runtime. See ... 
http://perldoc.com/perl5.6.1/pod/perlembed.html#Maintaining-multiple-interpreter-instances
This is a cross platform problem I believe.

--Kervin