Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33471 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60158 invoked by uid 1010); 27 Nov 2007 19:40:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 60143 invoked from network); 27 Nov 2007 19:40:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Nov 2007 19:40:53 -0000 Authentication-Results: pb1.pair.com header.from=kingwez@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=kingwez@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.132.242 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: kingwez@gmail.com X-Host-Fingerprint: 209.85.132.242 an-out-0708.google.com Received: from [209.85.132.242] ([209.85.132.242:58527] helo=an-out-0708.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A8/A5-25304-4C27C474 for ; Tue, 27 Nov 2007 14:40:53 -0500 Received: by an-out-0708.google.com with SMTP id c18so240328anc for ; Tue, 27 Nov 2007 11:40:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:in-reply-to:subject:references:message-id:content-type:content-transfer-encoding:mime-version:date:cc:x-mailer; bh=Aua57sztDLdq1Wq1K6Keeg54Cjsj56/hE13xNXBqiXI=; b=QUEy+fdijCABUMqvFMRTY1wuSUS+AxvhXeHYL7FVLuf9wMPa0HT3Y4ZzwuDvEk1CtwuuoO43gtJ3Ld6gEr1ogrBCd+d3rbPf+MuVHnRlrV0z12rmcp8SCvDS+yjwHX1mAkdujxlg0PXQsQy5lCXG7Yl6wOr7OnAS0CWZmxzFWK4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:from:to:in-reply-to:subject:references:message-id:content-type:content-transfer-encoding:mime-version:date:cc:x-mailer; b=f6sBiz4EMS9pvkwmHXqDCSMF5q29r9XwslMgukFljOhCYC1YUkHg25pQxk2vLpJour6w6j56LaEBCjeQaqDKCRhDDlnt/3zW5As2xfGx6A5omtdgVzYcArd6mPYmL6WlIGfeVFi7bl9x7LFS1fRg4ZhgOQPSzIMcmlOlgGO5uMU= Received: by 10.100.241.17 with SMTP id o17mr7232541anh.1196192446716; Tue, 27 Nov 2007 11:40:46 -0800 (PST) Received: from ?10.79.0.104? ( [8.8.38.2]) by mx.google.com with ESMTPS id 18sm6542226agb.2007.11.27.11.40.44 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 27 Nov 2007 11:40:45 -0800 (PST) To: Hans-Peter Oeri In-Reply-To: <40.30.64829.53898474@pb1.pair.com> References: <40.30.64829.53898474@pb1.pair.com> Message-ID: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v915) Date: Tue, 27 Nov 2007 14:40:41 -0500 Cc: internals@lists.php.net X-Mailer: Apple Mail (2.915) Subject: Re: [PHP-DEV] [patch] PDO_FETCH_KEYS From: kingwez@gmail.com (Wez Furlong) What purpose does this serve exactly? Why do we need to allocate an empty string for every database connection? Why do we need this in the core? There's a lot of manipulation being done here that is better suited to happen in PHP script land where it's safer and easier to maintain. --Wez. On Nov 24, 2007, at 4:31 PM, Hans-Peter Oeri wrote: > > @@ -1496,6 +1513,7 @@ > memset(dbh, 0, sizeof(*dbh)); > dbh->ce = ce; > dbh->refcount = 1; > + dbh->nullbase = estrdup( "" ); > ALLOC_HASHTABLE(dbh->properties); > zend_hash_init(dbh->properties, 0, NULL, ZVAL_PTR_DTOR, 0); > zend_hash_copy(dbh->properties, &ce->default_properties, > (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); > diff -u -r1.118.2.38.2.24.2.7 pdo_stmt.c