Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27881 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67633 invoked by uid 1010); 7 Feb 2007 11:25:27 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 67618 invoked from network); 7 Feb 2007 11:25:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Feb 2007 11:25:27 -0000 Authentication-Results: pb1.pair.com header.from=antony@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=antony@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: antony@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from [212.25.124.162] ([212.25.124.162:7596] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 86/C5-18288-527B9C54 for ; Wed, 07 Feb 2007 06:25:26 -0500 Received: (qmail 23307 invoked from network); 7 Feb 2007 11:23:40 -0000 Received: from internal.zend.office (HELO ?127.0.0.1?) (10.1.1.1) by internal.zend.office with SMTP; 7 Feb 2007 11:23:40 -0000 Message-ID: <45C9B71C.4030806@zend.com> Date: Wed, 07 Feb 2007 14:25:16 +0300 User-Agent: Thunderbird 2.0b2 (X11/20070116) MIME-Version: 1.0 To: Caroline Maynard CC: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] C++ in non-threaded PHP From: antony@zend.com (Antony Dovgal) On 01/23/2007 06:07 PM, Caroline Maynard wrote: > I hit some problems compiling a C++ extension in a non-threaded > environment, because of some missing extern "C" declarations. Looks like > this was previously fixed for threaded mode only. Please would someone > with karma apply the following patch? What about ini_scanner_globals & language_scanner_globals? Don't they require the same declaration? Also, how to reproduce it? I compile C++ extensions quite often and do not see any problems. > Index: zend_globals_macros.h > =================================================================== > RCS file: /repository/ZendEngine2/zend_globals_macros.h,v > retrieving revision 1.22.2.1.2.2 > diff -u -r1.22.2.1.2.2 zend_globals_macros.h > --- zend_globals_macros.h 18 Jul 2006 09:06:33 -0000 1.22.2.1.2.2 > +++ zend_globals_macros.h 23 Jan 2007 14:57:45 -0000 > @@ -34,8 +34,10 @@ > END_EXTERN_C() > #else > # define CG(v) (compiler_globals.v) > +BEGIN_EXTERN_C() > extern ZEND_API struct _zend_compiler_globals compiler_globals; > int zendparse(void); > +END_EXTERN_C() > #endif > > > @@ -44,7 +46,9 @@ > # define EG(v) TSRMG(executor_globals_id, zend_executor_globals *, v) > #else > # define EG(v) (executor_globals.v) > +BEGIN_EXTERN_C() > extern ZEND_API zend_executor_globals executor_globals; > +END_EXTERN_C() > #endif > > /* Language Scanner */ > -- Wbr, Antony Dovgal