Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24233 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89348 invoked by uid 1010); 30 Jun 2006 23:47:04 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 89323 invoked from network); 30 Jun 2006 23:47:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jun 2006 23:47:03 -0000 X-Host-Fingerprint: 72.242.201.242 unknown Received: from ([72.242.201.242:23178] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 4A/EC-15023-443B5A44 for ; Fri, 30 Jun 2006 19:27:02 -0400 Message-ID: <4A.EC.15023.443B5A44@pb1.pair.com> To: internals@lists.php.net Reply-To: "l0t3k" References: <200606302354.02272.an.dromeda@btconnect.com> Date: Fri, 30 Jun 2006 19:24:54 -0400 Lines: 62 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-RFC2646: Format=Flowed; Original X-Posted-By: 72.242.201.242 Subject: Re: TSRMLS_D/C persistence From: cshmoove@hotmail.com ("l0t3k") Andrew, i've only skimmed your question, and at the risk of being irrelevant ... check out http://cvs.php.net/viewvc.cgi/php-src/ext/unicode/property.c?revision=1.14&view=markup and search for PHP_FUNCTION(char_enum_names). Pay attention to the macro TSRMLS_SET_CTX(ectx.thread_ctx)in that function, and the macro TSRMLS_FETCH_FROM_CTX(ctx->thread_ctx);in the callback php_enum_char_type_range()l0t3k ""Andrew MatherBt"" wrote in message news:200606302354.02272.an.dromeda@btconnect.com... > > How long are the TSRMLS_D/C parameters good for? > > Can the resultant tsrm_ls value be safely stored? > > I presume the answer is no, and these paramters > should be passed in each time a function is called, > but I would be curious to know differently, if for example > it could be passed in once at (external object) creation time, > and that object could use the trsm_ls directly, rather than the > TSRMLS_D/C semantics. > > ... > > Otherwise it seems clear that an external object outside php > cannot use php semantics, so cannot use the php_stream wrappers. > > ... > > That being the case, an external object (referenced from within eg: > a php extension) must either: > > a. be able to ignore php-streams and use system streams directly > (not obviously apparent, given errors experienced to date) > or > > b. cannot use system streams when calls originate from php/extensions, > (in which case no 3rd party objects which access streams are reliable in > php/extensions) > > Clearly a. is more desirable than b. , despite the fact that an apparently > reliable 3rd party object did generate errors when called from within a > php-extension. > > --- > > This is my third attempt to ask for a clear answer as to whether a. or b. > is correct, so hopefully someone will notice, has the answer, and can > respond. > > Cheers, > > Andrew.