tony2001 Thu Oct 27 15:38:41 2005 EDT
Modified files:
/php-src/ext/pdo php_pdo_driver.h
Log:
forgot to commit new pdo_attr_ function
http://cvs.php.net/diff.php/php-src/ext/pdo/php_pdo_driver.h?r1=1.70&r2=1.71&ty=u
Index: php-src/ext/pdo/php_pdo_driver.h
diff -u php-src/ext/pdo/php_pdo_driver.h:1.70
php-src/ext/pdo/php_pdo_driver.h:1.71
--- php-src/ext/pdo/php_pdo_driver.h:1.70 Tue Oct 25 12:03:11 2005
+++ php-src/ext/pdo/php_pdo_driver.h Thu Oct 27 15:38:36 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pdo_driver.h,v 1.70 2005/10/25 16:03:11 tony2001 Exp $ */
+/* $Id: php_pdo_driver.h,v 1.71 2005/10/27 19:38:36 tony2001 Exp $ */
#ifndef PHP_PDO_DRIVER_H
#define PHP_PDO_DRIVER_H
@@ -193,6 +193,16 @@
}
return defval;
}
+static inline char *pdo_attr_strval(zval *options, enum pdo_attribute_type
option_name, char *defval TSRMLS_DC)
+{
+ zval **v;
+
+ if (options && SUCCESS == zend_hash_index_find(Z_ARRVAL_P(options),
option_name, (void**)&v)) {
+ convert_to_string_ex(v);
+ return estrndup(Z_STRVAL_PP(v), Z_STRLEN_PP(v));
+ }
+ return defval ? estrdup(defval) : NULL;
+}
/* }}} */
/* This structure is registered with PDO when a PDO driver extension is
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php