diff options
Diffstat (limited to 'ext/pdo_firebird')
| -rw-r--r-- | ext/pdo_firebird/firebird_driver.c | 7 | ||||
| -rw-r--r-- | ext/pdo_firebird/firebird_statement.c | 9 | ||||
| -rw-r--r-- | ext/pdo_firebird/package2.xml | 68 | ||||
| -rw-r--r-- | ext/pdo_firebird/pdo_firebird.c | 2 | ||||
| -rw-r--r-- | ext/pdo_firebird/php_pdo_firebird_int.h | 4 |
5 files changed, 12 insertions, 78 deletions
diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c index ab2571df3d..a00a9270db 100644 --- a/ext/pdo_firebird/firebird_driver.c +++ b/ext/pdo_firebird/firebird_driver.c @@ -545,6 +545,9 @@ static int firebird_handle_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *v info_func(tmp); ZVAL_STRING(val, tmp); } +#ifdef PHP_WIN32 + FreeLibrary(l); +#endif #else ZVAL_NULL(val); #endif @@ -592,7 +595,7 @@ static int pdo_firebird_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval } /* }}} */ -static struct pdo_dbh_methods firebird_methods = { /* {{{ */ +static const struct pdo_dbh_methods firebird_methods = { /* {{{ */ firebird_handle_closer, firebird_handle_preparer, firebird_handle_doer, @@ -677,7 +680,7 @@ static int pdo_firebird_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* /* }}} */ -pdo_driver_t pdo_firebird_driver = { /* {{{ */ +const pdo_driver_t pdo_firebird_driver = { /* {{{ */ PDO_DRIVER_HEADER(firebird), pdo_firebird_handle_factory }; diff --git a/ext/pdo_firebird/firebird_statement.c b/ext/pdo_firebird/firebird_statement.c index 3feeedf39f..952080688e 100644 --- a/ext/pdo_firebird/firebird_statement.c +++ b/ext/pdo_firebird/firebird_statement.c @@ -458,11 +458,10 @@ static int firebird_bind_blob(pdo_stmt_t *stmt, ISC_QUAD *blob_id, zval *param) return 0; } - data = *param; - if (Z_TYPE_P(param) != IS_STRING) { - zval_copy_ctor(&data); - convert_to_string(&data); + ZVAL_STR(&data, zval_get_string_func(param)); + } else { + ZVAL_COPY_VALUE(&data, param); } for (rem_cnt = Z_STRLEN(data); rem_cnt > 0; rem_cnt -= chunk_size) { @@ -762,7 +761,7 @@ static int firebird_stmt_cursor_closer(pdo_stmt_t *stmt) /* {{{ */ /* }}} */ -struct pdo_stmt_methods firebird_stmt_methods = { /* {{{ */ +const struct pdo_stmt_methods firebird_stmt_methods = { /* {{{ */ firebird_stmt_dtor, firebird_stmt_execute, firebird_stmt_fetch, diff --git a/ext/pdo_firebird/package2.xml b/ext/pdo_firebird/package2.xml deleted file mode 100644 index b744d388bc..0000000000 --- a/ext/pdo_firebird/package2.xml +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<package packagerversion="1.4.2" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 -http://pear.php.net/dtd/tasks-1.0.xsd -http://pear.php.net/dtd/package-2.0 -http://pear.php.net/dtd/package-2.0.xsd"> - <name>PDO_FIREBIRD</name> - <channel>pecl.php.net</channel> - <summary>Firebird driver for PDO</summary> - <description>This extension provides a Firebird driver for PDO. It supports -all versions of Firebird 2.1 and up. - </description> - <lead> - <name>Ard Biesheuvel</name> - <user>abies</user> - <email>abies@php.net</email> - <active>yes</active> - </lead> - <date>2013-09-01</date> - <version> - <release>1.0</release> - <api>1.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <license uri="http://www.php.net/license">PHP</license> - <notes>To compile and run this module, you will need to have the main PDO module and Firebird's client library installed on your system. -Hope it works! - </notes> - <contents> - <dir name="/"> - <dir name="tests"> - <file name="connect.phpt" role="test" /> - <file name="ddl.phpt" role="test" /> - <file name="execute.phpt" role="test" /> - </dir> <!-- //tests --> - <file name="config.m4" role="src" /> - <file name="config.w32" role="src" /> - <file name="CREDITS" role="doc" /> - <file name="firebird_driver.c" role="src" /> - <file name="firebird_statement.c" role="src" /> - <file name="pdo_firebird.c" role="src" /> - <file name="php_pdo_firebird.h" role="src" /> - <file name="php_pdo_firebird_int.h" role="src" /> - </dir> <!-- / --> - </contents> - <dependencies> - <required> - <php> - <min>5.3.27</min> - </php> - <pearinstaller> - <min>1.4.0</min> - </pearinstaller> - <package> - <name>pdo</name> - <channel>pecl.php.net</channel> - <min>1.0.3</min> - <providesextension>PDO</providesextension> - </package> - </required> - </dependencies> - <providesextension>PDO_FIREBIRD</providesextension> - <extsrcrelease> - <configureoption name="with-pdo-firebird" prompt="dir" /> - </extsrcrelease> -</package> diff --git a/ext/pdo_firebird/pdo_firebird.c b/ext/pdo_firebird/pdo_firebird.c index 7ea1b4fbdc..1cc1b970fc 100644 --- a/ext/pdo_firebird/pdo_firebird.c +++ b/ext/pdo_firebird/pdo_firebird.c @@ -28,7 +28,7 @@ #include "php_pdo_firebird.h" #include "php_pdo_firebird_int.h" -const zend_function_entry pdo_firebird_functions[] = { /* {{{ */ +static const zend_function_entry pdo_firebird_functions[] = { /* {{{ */ PHP_FE_END }; /* }}} */ diff --git a/ext/pdo_firebird/php_pdo_firebird_int.h b/ext/pdo_firebird/php_pdo_firebird_int.h index 3d14dacdf8..0ae59358f2 100644 --- a/ext/pdo_firebird/php_pdo_firebird_int.h +++ b/ext/pdo_firebird/php_pdo_firebird_int.h @@ -130,9 +130,9 @@ typedef struct { } pdo_firebird_stmt; -extern pdo_driver_t pdo_firebird_driver; +extern const pdo_driver_t pdo_firebird_driver; -extern struct pdo_stmt_methods firebird_stmt_methods; +extern const struct pdo_stmt_methods firebird_stmt_methods; void _firebird_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, char const *file, zend_long line); |
