X-Git-Url: http://git.indexdata.com/?p=simpleserver-moved-to-github.git;a=blobdiff_plain;f=SimpleServer.xs;h=9e276217aeb2ed5525f2427a8c5959fbbaf7162e;hp=13ea3e5fd34051ba1ecd993b05011bcc20f8b454;hb=c7145efffe9cfd830ba341d782e8b07ca0a6b40f;hpb=94e43eb8f5155e810f5e04efca59214408221205 diff --git a/SimpleServer.xs b/SimpleServer.xs index 13ea3e5..9e27621 100644 --- a/SimpleServer.xs +++ b/SimpleServer.xs @@ -1,9 +1,8 @@ /* - - * $Id: SimpleServer.xs,v 1.23 2004-05-13 18:55:40 adam Exp $ + * $Id: SimpleServer.xs,v 1.26 2004-05-29 07:04:26 adam Exp $ * ---------------------------------------------------------------------- * - * Copyright (c) 2000, Index Data. + * Copyright (c) 2000-2004, Index Data. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation, in whole or in part, for any purpose, is hereby granted, @@ -28,10 +27,9 @@ * OF THIS SOFTWARE. */ - - #include "EXTERN.h" #include "perl.h" +#include "proto.h" #include "embed.h" #include "XSUB.h" #include @@ -120,6 +118,7 @@ int tst_clones(void) #endif int simpleserver_clone(void) { +#ifdef USE_ITHREADS nmem_mutex_enter(simpleserver_mutex); if (1) { @@ -130,12 +129,14 @@ int simpleserver_clone(void) { * This will only happen when threaded is used.. */ if (!current) { + PerlInterpreter *perl_interp; PERL_SET_CONTEXT( root_perl_context ); - PerlInterpreter *perl_interp = perl_clone(root_perl_context, 0); + perl_interp = perl_clone(root_perl_context, 0); PERL_SET_CONTEXT( perl_interp ); } } nmem_mutex_leave(simpleserver_mutex); +#endif return 0; }