diff options
| author | Dmitry Stogov <dmitry@php.net> | 2005-08-22 12:22:16 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2005-08-22 12:22:16 +0000 |
| commit | 6b622046dc25b161706dbb25f6416a4f3ddf55ec (patch) | |
| tree | 134be93d8d80ed516f2587cab1224115083676db /ext/pdo_sqlite/sqlite_driver.c | |
| parent | 6fad26469c9b0f539c51514d9a125ec34fc67ad8 (diff) | |
| download | php-git-6b622046dc25b161706dbb25f6416a4f3ddf55ec.tar.gz | |
zend_is_callable() and zend_make_callable() were changed to return readable function name as zval (instead of string).
Diffstat (limited to 'ext/pdo_sqlite/sqlite_driver.c')
| -rw-r--r-- | ext/pdo_sqlite/sqlite_driver.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c index b5304410b9..a93aec9eef 100644 --- a/ext/pdo_sqlite/sqlite_driver.c +++ b/ext/pdo_sqlite/sqlite_driver.c @@ -457,7 +457,7 @@ static PHP_METHOD(SQLite, sqliteCreateFunction) char *func_name; int func_name_len; long argc = -1; - char *cbname = NULL; + zval cbname; pdo_dbh_t *dbh; pdo_sqlite_db_handle *H; int ret; @@ -470,11 +470,11 @@ static PHP_METHOD(SQLite, sqliteCreateFunction) dbh = zend_object_store_get_object(getThis() TSRMLS_CC); if (!zend_is_callable(callback, 0, &cbname)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "function '%s' is not callable", cbname); - efree(cbname); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "function '%R' is not callable", Z_TYPE(cbname), Z_UNIVAL(cbname)); + zval_dtor(&cbname); RETURN_FALSE; } - efree(cbname); + zval_dtor(&cbname); H = (pdo_sqlite_db_handle *)dbh->driver_data; @@ -528,7 +528,7 @@ static PHP_METHOD(SQLite, sqliteCreateAggregate) char *func_name; int func_name_len; long argc = -1; - char *cbname = NULL; + zval cbname; pdo_dbh_t *dbh; pdo_sqlite_db_handle *H; int ret; @@ -541,17 +541,17 @@ static PHP_METHOD(SQLite, sqliteCreateAggregate) dbh = zend_object_store_get_object(getThis() TSRMLS_CC); if (!zend_is_callable(step_callback, 0, &cbname)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "function '%s' is not callable", cbname); - efree(cbname); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "function '%R' is not callable", Z_TYPE(cbname), Z_UNIVAL(cbname)); + zval_dtor(&cbname); RETURN_FALSE; } - efree(cbname); + zval_dtor(&cbname); if (!zend_is_callable(fini_callback, 0, &cbname)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "function '%s' is not callable", cbname); - efree(cbname); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "function '%R' is not callable", Z_TYPE(cbname), Z_UNIVAL(cbname)); + zval_dtor(&cbname); RETURN_FALSE; } - efree(cbname); + zval_dtor(&cbname); H = (pdo_sqlite_db_handle *)dbh->driver_data; |
