+----------------------------------------------------------------------+
| Authors: Scott MacVicar <scottmac@php.net> |
+----------------------------------------------------------------------+
-
- $Id$
*/
+/* $Id$ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "zend_interfaces.h"
ZEND_DECLARE_MODULE_GLOBALS(sqlite3)
+
static PHP_GINIT_FUNCTION(sqlite3);
-static int php_sqlite3_authorizer(void *autharg, int access_type, const char *arg3, const char *arg4,
- const char *arg5, const char *arg6);
+static int php_sqlite3_authorizer(void *autharg, int access_type, const char *arg3, const char *arg4, const char *arg5, const char *arg6);
static void sqlite3_param_dtor(void *data);
static int php_sqlite3_compare_stmt_free( php_sqlite3_stmt_free_list **stmt_list, sqlite3_stmt *statement );
}
/* {{{ PHP_INI
- */
+*/
PHP_INI_BEGIN()
STD_PHP_INI_ENTRY("sqlite3.extension_dir", NULL, PHP_INI_SYSTEM, OnUpdateString, extension_dir, zend_sqlite3_globals, sqlite3_globals)
PHP_INI_END()
zend_class_entry *php_sqlite3_result_entry;
/* {{{ proto bool SQLite3::open(String filename [, int Flags [, string Encryption Key]])
- Opens a SQLite 3 Database, if the build includes encryption then it will attempt to use the key
-*/
+ Opens a SQLite 3 Database, if the build includes encryption then it will attempt to use the key. */
PHP_METHOD(sqlite3, open)
{
php_sqlite3_db_object *db_obj;
int filename_len, encryption_key_len, flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE;
db_obj = (php_sqlite3_db_object *)zend_object_store_get_object(object TSRMLS_CC);
- if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ls",
- &filename, &filename_len, &flags, &encryption_key, &encryption_key_len)) {
+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ls", &filename, &filename_len, &flags, &encryption_key, &encryption_key_len)) {
return;
}
RETURN_FALSE;
}
-#if PHP_MAJOR_VERSION < 6
if (PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
efree(fullpath);
RETURN_FALSE;
}
-#endif
if (php_check_open_basedir(fullpath TSRMLS_CC)) {
efree(fullpath);
}
#endif
- if (
-#if PHP_MAJOR_VERSION < 6
- PG(safe_mode) ||
-#endif
- (PG(open_basedir) && *PG(open_basedir))) {
+ if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) {
sqlite3_set_authorizer(db_obj->db, php_sqlite3_authorizer, NULL);
}
/* }}} */
/* {{{ proto bool SQLite3::close()
- Close a SQLite 3 Database.
-*/
+ Close a SQLite 3 Database. */
PHP_METHOD(sqlite3, close)
{
php_sqlite3_db_object *db_obj;
/* }}} */
/* {{{ proto bool SQLite3::exec(String Query)
- Executes a result-less query against a given database
-*/
+ Executes a result-less query against a given database. */
PHP_METHOD(sqlite3, exec)
{
php_sqlite3_db_object *db_obj;
SQLITE3_CHECK_INITIALIZED(db_obj->initialised, SQLite3)
- if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
- &sql, &sql_len)) {
+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &sql, &sql_len)) {
return;
}
/* }}} */
/* {{{ proto Array SQLite3::version()
- Returns the SQLite3 Library version as a string constant and as a number.
-*/
+ Returns the SQLite3 Library version as a string constant and as a number. */
PHP_METHOD(sqlite3, version)
{
if (zend_parse_parameters_none() == FAILURE) {
/* }}} */
/* {{{ proto int SQLite3::lastInsertRowID()
- Returns the rowid of the most recent INSERT into the database from the database connection.
-*/
+ Returns the rowid of the most recent INSERT into the database from the database connection. */
PHP_METHOD(sqlite3, lastInsertRowID)
{
php_sqlite3_db_object *db_obj;
/* }}} */
/* {{{ proto int SQLite3::lastErrorCode()
- Returns the numeric result code of the most recent failed sqlite API call for the database connection.
-*/
+ Returns the numeric result code of the most recent failed sqlite API call for the database connection. */
PHP_METHOD(sqlite3, lastErrorCode)
{
php_sqlite3_db_object *db_obj;
/* }}} */
/* {{{ proto string SQLite3::lastErrorMsg()
- Returns english text describing the most recent failed sqlite API call for the database connection.
-*/
+ Returns english text describing the most recent failed sqlite API call for the database connection. */
PHP_METHOD(sqlite3, lastErrorMsg)
{
php_sqlite3_db_object *db_obj;
/* }}} */
/* {{{ proto bool SQLite3::loadExtension(String Shared Library)
- Attempts to load an SQLite extension library
-*/
+ Attempts to load an SQLite extension library. */
PHP_METHOD(sqlite3, loadExtension)
{
php_sqlite3_db_object *db_obj;
SQLITE3_CHECK_INITIALIZED(db_obj->initialised, SQLite3)
- if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
- &extension, &extension_len)) {
+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &extension, &extension_len)) {
return;
}
/* }}} */
/* {{{ proto int SQLite3::changes()
- Returns the number of database rows that were changed (or inserted or deleted) by the most recent SQL statement.
-*/
+ Returns the number of database rows that were changed (or inserted or deleted) by the most recent SQL statement. */
PHP_METHOD(sqlite3, changes)
{
php_sqlite3_db_object *db_obj;
/* }}} */
/* {{{ proto String SQLite3::escapeString(String value)
- Returns a string that has been properly escaped
-*/
+ Returns a string that has been properly escaped. */
PHP_METHOD(sqlite3, escapeString)
{
char *sql, *ret;
int sql_len;
- if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
- &sql, &sql_len)) {
+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &sql, &sql_len)) {
return;
}
/* }}} */
/* {{{ proto sqlite3_stmt SQLite3::prepare(String Query)
- Returns a prepared SQL statement for execution
-*/
+ Returns a prepared SQL statement for execution. */
PHP_METHOD(sqlite3, prepare)
{
php_sqlite3_db_object *db_obj;
SQLITE3_CHECK_INITIALIZED(db_obj->initialised, SQLite3)
- if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
- &sql, &sql_len)) {
+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &sql, &sql_len)) {
return;
}
stmt_obj->db_obj_zval = getThis();
Z_ADDREF_P(object);
-
+
errcode = sqlite3_prepare_v2(db_obj->db, sql, sql_len, &(stmt_obj->stmt), NULL);
if (errcode != SQLITE_OK) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to prepare statement: %d, %s", errcode, sqlite3_errmsg(db_obj->db));
/* }}} */
/* {{{ proto sqlite3_result SQLite3::query(String Query)
- Returns true or false, for queries that return data it will return a sqlite3_result object
-*/
+ Returns true or false, for queries that return data it will return a sqlite3_result object. */
PHP_METHOD(sqlite3, query)
{
php_sqlite3_db_object *db_obj;
SQLITE3_CHECK_INITIALIZED(db_obj->initialised, SQLite3)
- if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
- &sql, &sql_len)) {
+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &sql, &sql_len)) {
return;
}
}
/* }}} */
-static zval* sqlite_value_to_zval(sqlite3_stmt *stmt, int column)
+static zval* sqlite_value_to_zval(sqlite3_stmt *stmt, int column) /* {{{ */
{
zval *data;
MAKE_STD_ZVAL(data);
}
return data;
}
+/* }}} */
/* {{{ proto sqlite3_result SQLite3::querySingle(String Query [, entire_row = false])
- Returns a string of the first column, or an array of the entire row
-*/
+ Returns a string of the first column, or an array of the entire row. */
PHP_METHOD(sqlite3, querySingle)
{
php_sqlite3_db_object *db_obj;
SQLITE3_CHECK_INITIALIZED(db_obj->initialised, SQLite3)
- if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b",
- &sql, &sql_len, &entire_row)) {
+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &sql, &sql_len, &entire_row)) {
return;
}
RETURN_FALSE;
}
-
return_code = sqlite3_step(stmt);
switch (return_code) {
}
/* }}} */
-static int sqlite3_do_callback(struct php_sqlite3_fci *fc, zval *cb,
- int argc, sqlite3_value **argv, sqlite3_context *context,
- int is_agg TSRMLS_DC)
+static int sqlite3_do_callback(struct php_sqlite3_fci *fc, zval *cb, int argc, sqlite3_value **argv, sqlite3_context *context, int is_agg TSRMLS_DC) /* {{{ */
{
zval ***zargs = NULL;
zval *retval = NULL;
case SQLITE_BLOB:
case SQLITE3_TEXT:
default:
- ZVAL_STRINGL(*zargs[i + is_agg], (char*)sqlite3_value_text(argv[i]),
- sqlite3_value_bytes(argv[i]), 1);
+ ZVAL_STRINGL(*zargs[i + is_agg], (char*)sqlite3_value_text(argv[i]), sqlite3_value_bytes(argv[i]), 1);
break;
}
}
default:
convert_to_string_ex(&retval);
- sqlite3_result_text(context, Z_STRVAL_P(retval),
- Z_STRLEN_P(retval), SQLITE_TRANSIENT);
+ sqlite3_result_text(context, Z_STRVAL_P(retval), Z_STRLEN_P(retval), SQLITE_TRANSIENT);
break;
}
} else {
if (retval) {
zval_ptr_dtor(&retval);
}
-
return ret;
}
+/* }}}*/
-static void php_sqlite3_callback_func(sqlite3_context *context, int argc, sqlite3_value **argv)
+static void php_sqlite3_callback_func(sqlite3_context *context, int argc, sqlite3_value **argv) /* {{{ */
{
php_sqlite3_func *func = (php_sqlite3_func *)sqlite3_user_data(context);
TSRMLS_FETCH();
sqlite3_do_callback(&func->afunc, func->func, argc, argv, context, 0 TSRMLS_CC);
}
+/* }}}*/
-static void php_sqlite3_callback_step(sqlite3_context *context, int argc, sqlite3_value **argv)
+static void php_sqlite3_callback_step(sqlite3_context *context, int argc, sqlite3_value **argv) /* {{{ */
{
php_sqlite3_func *func = (php_sqlite3_func *)sqlite3_user_data(context);
TSRMLS_FETCH();
sqlite3_do_callback(&func->astep, func->step, argc, argv, context, 1 TSRMLS_CC);
}
+/* }}} */
-static void php_sqlite3_callback_final(sqlite3_context *context)
+static void php_sqlite3_callback_final(sqlite3_context *context) /* {{{ */
{
php_sqlite3_func *func = (php_sqlite3_func *)sqlite3_user_data(context);
TSRMLS_FETCH();
sqlite3_do_callback(&func->afini, func->fini, 0, NULL, context, 1 TSRMLS_CC);
}
+/* }}} */
/* {{{ proto bool SQLite3::createFunction(string name, mixed callback [, int argcount]))
- Allows registration of a PHP function as a SQLite UDF that can be called within SQL statements
-*/
+ Allows registration of a PHP function as a SQLite UDF that can be called within SQL statements. */
PHP_METHOD(sqlite3, createFunction)
{
php_sqlite3_db_object *db_obj;
/* }}} */
/* {{{ proto bool SQLite3::createAggregate(string name, mixed step, mixed final [, int argcount]))
- Allows registration of a PHP function for use as an aggregate
-*/
+ Allows registration of a PHP function for use as an aggregate. */
PHP_METHOD(sqlite3, createAggregate)
{
php_sqlite3_db_object *db_obj;
/* }}} */
/* {{{ proto int SQLite3_stmt::paramCount()
- Returns the number of parameters within the prepared statement
-*/
+ Returns the number of parameters within the prepared statement. */
PHP_METHOD(sqlite3_stmt, paramCount)
{
php_sqlite3_stmt *stmt_obj;
/* }}} */
/* {{{ proto bool SQLite3_stmt::close()
- Closes the prepared statement
-*/
+ Closes the prepared statement. */
PHP_METHOD(sqlite3_stmt, close)
{
php_sqlite3_stmt *stmt_obj;
return;
}
- /*zend_llist_del_element(&(stmt_obj->db_obj->stmt_list), stmt_obj->stmt,
- (int (*)(void *, void *)) php_sqlite3_compare_stmt_free);*/
+ /*zend_llist_del_element(&(stmt_obj->db_obj->stmt_list), stmt_obj->stmt, (int (*)(void *, void *)) php_sqlite3_compare_stmt_free);*/
RETURN_TRUE;
}
/* }}} */
/* {{{ proto bool SQLite3_stmt::reset()
- Reset the prepared statement to the state before it was executed, bindings still remain.
-*/
+ Reset the prepared statement to the state before it was executed, bindings still remain. */
PHP_METHOD(sqlite3_stmt, reset)
{
php_sqlite3_stmt *stmt_obj;
/* }}} */
/* {{{ proto bool SQLite3_stmt::clear()
- Clear all current bound parameters
-*/
+ Clear all current bound parameters. */
PHP_METHOD(sqlite3_stmt, clear)
{
php_sqlite3_stmt *stmt_obj;
/* }}} */
/* {{{ proto bool SQLite3_stmt::bindParam(int parameter_number, mixed parameter [, int type])
- Bind Paramater to a stmt variable
-*/
+ Bind Paramater to a stmt variable. */
PHP_METHOD(sqlite3_stmt, bindParam)
{
php_sqlite3_stmt *stmt_obj;
param.param_number = -1;
param.type = SQLITE3_TEXT;
- if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "lz|l",
- ¶m.param_number, ¶m.parameter, ¶m.type) == FAILURE) {
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz|l",
- ¶m.name, ¶m.name_len, ¶m.parameter, ¶m.type) == FAILURE) {
+ if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "lz|l", ¶m.param_number, ¶m.parameter, ¶m.type) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz|l", ¶m.name, ¶m.name_len, ¶m.parameter, ¶m.type) == FAILURE) {
return;
}
}
/* }}} */
/* {{{ proto bool SQLite3_stmt::bindValue(inte parameter_number, mixed parameter [, int type])
- Bind Value of a parameter to a stmt variable
-*/
+ Bind Value of a parameter to a stmt variable. */
PHP_METHOD(sqlite3_stmt, bindValue)
{
php_sqlite3_stmt *stmt_obj;
param.param_number = -1;
param.type = SQLITE3_TEXT;
- if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "lz/|l",
- ¶m.param_number, ¶m.parameter, ¶m.type) == FAILURE) {
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz/|l",
- ¶m.name, ¶m.name_len, ¶m.parameter, ¶m.type) == FAILURE) {
+ if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "lz/|l", ¶m.param_number, ¶m.parameter, ¶m.type) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz/|l", ¶m.name, ¶m.name_len, ¶m.parameter, ¶m.type) == FAILURE) {
return;
}
}
/* }}} */
/* {{{ proto SQLite3_result SQLite3_stmt::execute()
- Executes a prepared statement and returns a result set object
-*/
+ Executes a prepared statement and returns a result set object. */
PHP_METHOD(sqlite3_stmt, execute)
{
php_sqlite3_stmt *stmt_obj;
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to read stream for parameter %ld", param->param_number);
RETURN_FALSE;
}
- blength = php_stream_copy_to_mem(stream, &buffer, PHP_STREAM_COPY_ALL, 0);
+ blength = php_stream_copy_to_mem(stream, (void *)&buffer, PHP_STREAM_COPY_ALL, 0);
} else {
convert_to_string(param->parameter);
blength = Z_STRLEN_P(param->parameter);
/* }}} */
/* {{{ proto int SQLite3_result::numColumns()
- Number of columns in the result set
-*/
+ Number of columns in the result set. */
PHP_METHOD(sqlite3_result, numColumns)
{
php_sqlite3_result *result_obj;
/* }}} */
/* {{{ proto string SQLite3_result::columnName(int column)
- Returns the name of the nth column
-*/
+ Returns the name of the nth column. */
PHP_METHOD(sqlite3_result, columnName)
{
php_sqlite3_result *result_obj;
return;
}
- RETVAL_STRING((char *)sqlite3_column_name(result_obj->stmt_obj->stmt, column), 1);
+ RETVAL_STRING((char*)sqlite3_column_name(result_obj->stmt_obj->stmt, column), 1);
}
/* }}} */
-/* {{{ proto string SQLite3_result::columnType(int column)
- Returns the type of the nth column
-*/
+/* {{{ proto int SQLite3_result::columnType(int column)
+ Returns the type of the nth column. */
PHP_METHOD(sqlite3_result, columnType)
{
php_sqlite3_result *result_obj;
/* }}} */
/* {{{ proto array SQLite3_result::fetchArray([int mode])
- Fetch a result row as both an associative or numerically indexed array or both
-*/
+ Fetch a result row as both an associative or numerically indexed array or both. */
PHP_METHOD(sqlite3_result, fetchArray)
{
php_sqlite3_result *result_obj;
/* }}} */
/* {{{ proto bool SQLite3_result::reset()
- Resets the result set back to the first row
-*/
+ Resets the result set back to the first row. */
PHP_METHOD(sqlite3_result, reset)
{
php_sqlite3_result *result_obj;
/* }}} */
/* {{{ proto bool SQLite3_result::finalize()
- Closes the result set
-*/
+ Closes the result set. */
PHP_METHOD(sqlite3_result, finalize)
{
php_sqlite3_result *result_obj;
static
ZEND_BEGIN_ARG_INFO(arginfo_sqlite3_result_finalize, 0)
ZEND_END_ARG_INFO()
-
/* }}} */
/* {{{ php_sqlite3_class_methods */
PHP_ME(sqlite3_result, fetchArray, arginfo_sqlite3_result_fetcharray, ZEND_ACC_PUBLIC)
PHP_ME(sqlite3_result, reset, arginfo_sqlite3_result_reset, ZEND_ACC_PUBLIC)
PHP_ME(sqlite3_result, finalize, arginfo_sqlite3_result_finalize, ZEND_ACC_PUBLIC)
-
{NULL, NULL, NULL}
};
/* }}} */
-/* {{{ Authorization Callback */
-static int php_sqlite3_authorizer(void *autharg, int access_type, const char *arg3, const char *arg4,
- const char *arg5, const char *arg6)
+/* {{{ Authorization Callback
+*/
+static int php_sqlite3_authorizer(void *autharg, int access_type, const char *arg3, const char *arg4, const char *arg5, const char *arg6)
{
TSRMLS_FETCH();
switch (access_type) {
case SQLITE_ATTACH:
{
if (strncmp(arg3, ":memory:", sizeof(":memory:")-1)) {
-#if PHP_MAJOR_VERSION < 6
if (PG(safe_mode) && (!php_checkuid(arg3, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
return SQLITE_DENY;
}
-#endif
if (php_check_open_basedir(arg3 TSRMLS_CC)) {
return SQLITE_DENY;
}
/* }}} */
/* {{{ php_sqlite3_stmt_free
- */
+*/
static void php_sqlite3_stmt_free(void **item)
{
php_sqlite3_stmt_free_list *free_item = (php_sqlite3_stmt_free_list *)*item;
}
/* }}} */
-
static int php_sqlite3_compare_stmt_free( php_sqlite3_stmt_free_list **stmt_list, sqlite3_stmt *statement ) /* {{{ */
{
return (statement == (*stmt_list)->stmt);
}
+/* }}} */
-static void php_sqlite3_object_free_storage(void *object TSRMLS_DC)
+static void php_sqlite3_object_free_storage(void *object TSRMLS_DC) /* {{{ */
{
php_sqlite3_db_object *intern = (php_sqlite3_db_object *)object;
php_sqlite3_func *func;
zend_object_std_dtor(&intern->zo TSRMLS_CC);
efree(intern);
}
+/* }}} */
-static void php_sqlite3_stmt_object_free_storage(void *object TSRMLS_DC)
+static void php_sqlite3_stmt_object_free_storage(void *object TSRMLS_DC) /* {{{ */
{
php_sqlite3_stmt *intern = (php_sqlite3_stmt *)object;
zend_object_std_dtor(&intern->zo TSRMLS_CC);
efree(intern);
}
+/* }}} */
-static void php_sqlite3_result_object_free_storage(void *object TSRMLS_DC)
+static void php_sqlite3_result_object_free_storage(void *object TSRMLS_DC) /* {{{ */
{
php_sqlite3_result *intern = (php_sqlite3_result *)object;
zend_object_std_dtor(&intern->zo TSRMLS_CC);
efree(intern);
}
+/* }}} */
-static zend_object_value php_sqlite3_object_new(zend_class_entry *class_type TSRMLS_DC)
+static zend_object_value php_sqlite3_object_new(zend_class_entry *class_type TSRMLS_DC) /* {{{ */
{
zval *tmp;
zend_object_value retval;
return retval;
}
+/* }}} */
-static zend_object_value php_sqlite3_stmt_object_new(zend_class_entry *class_type TSRMLS_DC)
+static zend_object_value php_sqlite3_stmt_object_new(zend_class_entry *class_type TSRMLS_DC) /* {{{ */
{
zval *tmp;
zend_object_value retval;
return retval;
}
+/* }}} */
-static zend_object_value php_sqlite3_result_object_new(zend_class_entry *class_type TSRMLS_DC)
+static zend_object_value php_sqlite3_result_object_new(zend_class_entry *class_type TSRMLS_DC) /* {{{ */
{
zval *tmp;
zend_object_value retval;
return retval;
}
+/* }}} */
-static void sqlite3_param_dtor(void *data)
+static void sqlite3_param_dtor(void *data) /* {{{ */
{
struct php_sqlite3_bound_param *param = (struct php_sqlite3_bound_param*)data;
param->parameter = NULL;
}
}
+/* }}} */
/* {{{ PHP_MINIT_FUNCTION
- */
+*/
PHP_MINIT_FUNCTION(sqlite3)
{
zend_class_entry ce;
/* }}} */
/* {{{ PHP_MSHUTDOWN_FUNCTION
- */
+*/
PHP_MSHUTDOWN_FUNCTION(sqlite3)
{
UNREGISTER_INI_ENTRIES();
/* }}} */
/* {{{ PHP_MINFO_FUNCTION
- */
+*/
PHP_MINFO_FUNCTION(sqlite3)
{
php_info_print_table_start();
DISPLAY_INI_ENTRIES();
}
+/* }}} */
/* {{{ PHP_GINIT_FUNCTION
- */
+*/
static PHP_GINIT_FUNCTION(sqlite3)
{
memset(sqlite3_globals, 0, sizeof(*sqlite3_globals));
/* }}} */
/* {{{ sqlite3_module_entry
- */
+*/
zend_module_entry sqlite3_module_entry = {
STANDARD_MODULE_HEADER,
"sqlite3",
NULL,
PHP_MINFO(sqlite3),
PHP_SQLITE3_VERSION,
-#if ZEND_MODULE_API_NO >= 20060613
PHP_MODULE_GLOBALS(sqlite3),
PHP_GINIT(sqlite3),
NULL,
NULL,
STANDARD_MODULE_PROPERTIES_EX
-#else
- STANDARD_MODULE_PROPERTIES
-#endif
};
/* }}} */