Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34826 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41750 invoked by uid 1010); 18 Jan 2008 07:33:44 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 41735 invoked from network); 18 Jan 2008 07:33:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jan 2008 07:33:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=ioplex@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ioplex@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 64.233.166.177 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: ioplex@gmail.com X-Host-Fingerprint: 64.233.166.177 py-out-1112.google.com Received: from [64.233.166.177] ([64.233.166.177:24656] helo=py-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 75/62-18592-35650974 for ; Fri, 18 Jan 2008 02:33:41 -0500 Received: by py-out-1112.google.com with SMTP id u77so1110880pyb.16 for ; Thu, 17 Jan 2008 23:33:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=7IFNBCBqutvbU7cCmxcqV8LPw6raD0F4Dp+QKrB5ch8=; b=uZOWtqkqfdoOtYBvyDa+jJB0as/nJ+rt+yW5PFWwgyz71puIwTRcd5DaqBCClA6kYrJflDEMRnBYoHh9aqolpit8Yl/VLIoLhAwSDvUOQV6r48JSBWdaxy9XfZr+XvFP0mUBE9w1xernGH/yaR4ZuUu68UciKk4Oy/dl/eLSACk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=j6PyG6RDfphpmL9Urr00Tk+/xeK3RnSBhgTBvfgeiDAr4RHkTNYHpfOLq0ynH2s9PIw6BbzJhEw5To8F7VM3IvwcHPnh1zFOCQs4quIhaCdqy4OFt6wFDq3mmcbPbSSPH2lm1INOek+Bx7ELEBY7EdwgQPKzYqd+k109b3oLPlo= Received: by 10.142.127.10 with SMTP id z10mr1756073wfc.216.1200641614923; Thu, 17 Jan 2008 23:33:34 -0800 (PST) Received: by 10.142.133.21 with HTTP; Thu, 17 Jan 2008 23:33:34 -0800 (PST) Message-ID: <78c6bd860801172333p302ed885q89d97a1f4e60d9bc@mail.gmail.com> Date: Fri, 18 Jan 2008 02:33:34 -0500 To: "Antony Dovgal" Cc: internals@lists.php.net In-Reply-To: <47905069.7050004@daylessday.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <78c6bd860801171233p6f652d3bl54559d51963c1300@mail.gmail.com> <478FC8E4.3050104@daylessday.org> <78c6bd860801171739o3e746302v449afd6f62eaa30b@mail.gmail.com> <47905069.7050004@daylessday.org> Subject: Re: [PHP-DEV] Referencing constants in extension code From: ioplex@gmail.com ("Michael B Allen") On 1/18/08, Antony Dovgal wrote: > On 18.01.2008 04:39, Michael B Allen wrote: > >> You have to copy the string if you want to store it. > > > > Ok. Doesn't look like I have much choice. I just wanted to understand > > the problem better. I'll just copy the strings. > > > > But it does seem odd to me that PHP does not always reference string > > constants directly. I mean, why copy if you don't have to? > > Because you have to copy something that is going to be freed by PHP. > That's how it works & worked for ages - you don't have to free the > strings you get from zend_parse_parameters() because PHP does it for you. I newer versions of zend engine are more aggressive about collecting that memory and now it's caught up with me. I have changed my code to make a copy and all seems to be working well again. Thanks, Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/