summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite/sqlite_driver.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-07-21 12:33:25 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-07-21 12:49:36 +0200
commit1afcced1f0dfc8afd12bef4fb2cb08048edfd8af (patch)
tree08f01a71d30e64a25089ff6fff99b74fa1ba0c92 /ext/pdo_sqlite/sqlite_driver.c
parent047474c3b4dddd997ee3b8f66d0c4f091a40c02c (diff)
downloadphp-git-1afcced1f0dfc8afd12bef4fb2cb08048edfd8af.tar.gz
Add stubs for PDO SQLite extension methods
Putting these under a dummy PDO_SQLite_Ext class.
Diffstat (limited to 'ext/pdo_sqlite/sqlite_driver.c')
-rw-r--r--ext/pdo_sqlite/sqlite_driver.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c
index c0962ff3f9..090cb41c08 100644
--- a/ext/pdo_sqlite/sqlite_driver.c
+++ b/ext/pdo_sqlite/sqlite_driver.c
@@ -26,6 +26,7 @@
#include "php_pdo_sqlite.h"
#include "php_pdo_sqlite_int.h"
#include "zend_exceptions.h"
+#include "sqlite_driver_arginfo.h"
int _pdo_sqlite_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int line) /* {{{ */
{
@@ -516,7 +517,7 @@ static int php_sqlite3_collation_callback(void *context,
/* {{{ bool SQLite::sqliteCreateFunction(string name, callable callback [, int argcount, int flags])
Registers a UDF with the sqlite db handle */
-static PHP_METHOD(SQLite, sqliteCreateFunction)
+PHP_METHOD(PDO_SQLite_Ext, sqliteCreateFunction)
{
struct pdo_sqlite_func *func;
zend_fcall_info fci;
@@ -583,7 +584,7 @@ static PHP_METHOD(SQLite, sqliteCreateFunction)
aggregate UDF.
*/
-static PHP_METHOD(SQLite, sqliteCreateAggregate)
+PHP_METHOD(PDO_SQLite_Ext, sqliteCreateAggregate)
{
struct pdo_sqlite_func *func;
zend_fcall_info step_fci, fini_fci;
@@ -634,7 +635,7 @@ static PHP_METHOD(SQLite, sqliteCreateAggregate)
/* {{{ bool SQLite::sqliteCreateCollation(string name, callable callback)
Registers a collation with the sqlite db handle */
-static PHP_METHOD(SQLite, sqliteCreateCollation)
+PHP_METHOD(PDO_SQLite_Ext, sqliteCreateCollation)
{
struct pdo_sqlite_collation *collation;
zend_fcall_info fci;
@@ -674,18 +675,11 @@ static PHP_METHOD(SQLite, sqliteCreateCollation)
}
/* }}} */
-static const zend_function_entry dbh_methods[] = {
- PHP_ME(SQLite, sqliteCreateFunction, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(SQLite, sqliteCreateAggregate, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(SQLite, sqliteCreateCollation, NULL, ZEND_ACC_PUBLIC)
- PHP_FE_END
-};
-
static const zend_function_entry *get_driver_methods(pdo_dbh_t *dbh, int kind)
{
switch (kind) {
case PDO_DBH_DRIVER_METHOD_KIND_DBH:
- return dbh_methods;
+ return class_PDO_SQLite_Ext_methods;
default:
return NULL;