Re: [patch] PDO_FETCH_KEYS
| From: | Wez Furlong | Date: | Tue, 27 Nov 2007 19:40:41 +0000 |
| Subject: | Re: [patch] PDO_FETCH_KEYS | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-33471@lists.php.net to get a copy of this message | ||
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