cvs: php-src /ext/sqlite3 php_sqlite3.h php_sqlite3_structs.h sqlite3.c

From: Date: Sat, 26 Jul 2008 23:57:48 +0000
Subject: cvs: php-src /ext/sqlite3 php_sqlite3.h php_sqlite3_structs.h sqlite3.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-51638@lists.php.net to get a copy of this message
jani Sat Jul 26 23:57:48 2008 UTC Added files: /php-src/ext/sqlite3 php_sqlite3_structs.h Modified files: /php-src/ext/sqlite3 php_sqlite3.h sqlite3.c Log: - Fix build http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite3/php_sqlite3.h?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/sqlite3/php_sqlite3.h diff -u php-src/ext/sqlite3/php_sqlite3.h:1.3 php-src/ext/sqlite3/php_sqlite3.h:1.4 --- php-src/ext/sqlite3/php_sqlite3.h:1.3 Sat Jul 26 22:39:56 2008 +++ php-src/ext/sqlite3/php_sqlite3.h Sat Jul 26 23:57:48 2008 @@ -1,6 +1,6 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2008 The PHP Group | +----------------------------------------------------------------------+ @@ -16,25 +16,11 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sqlite3.h,v 1.3 2008/07/26 22:39:56 jani Exp $ */ +/* $Id: php_sqlite3.h,v 1.4 2008/07/26 23:57:48 jani Exp $ */ #ifndef PHP_SQLITE_H #define PHP_SQLITE_H -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef ZTS -#include "TSRM.h" -#endif - -/* Include PHP Standard Header */ -#include "php.h" - -/* Include headers */ -#include <sqlite3.h> - #define PHP_SQLITE3_VERSION "0.7-dev" extern zend_module_entry sqlite3_module_entry; @@ -54,95 +40,6 @@ #define PHP_SQLITE3_NUM 1<<1 #define PHP_SQLITE3_BOTH (PHP_SQLITE3_ASSOC|PHP_SQLITE3_NUM) -/* for backwards compatability reasons */ -#ifndef SQLITE_OPEN_READONLY -#define SQLITE_OPEN_READONLY 0x00000001 -#endif - -#ifndef SQLITE_OPEN_READWRITE -#define SQLITE_OPEN_READWRITE 0x00000002 -#endif - -#ifndef SQLITE_OPEN_CREATE -#define SQLITE_OPEN_CREATE 0x00000004 -#endif - -/* Structure for SQLite Statement Parameter. */ -struct php_sqlite3_bound_param { - long param_number; - char *name; - int name_len; - int type; - - zval *parameter; -}; - -struct php_sqlite3_fci { - zend_fcall_info fci; - zend_fcall_info_cache fcc; -}; - -/* Structure for SQLite function. */ -typedef struct _php_sqlite3_func { - struct _php_sqlite3_func *next; - - const char *func_name; - int argc; - - zval *func, *step, *fini; - struct php_sqlite3_fci afunc, astep, afini; -} php_sqlite3_func; - -/* Structure for SQLite Database object. */ -typedef struct _php_sqlite3_db_object { - zend_object zo; - int initialised; - sqlite3 *db; - php_sqlite3_func *funcs; -} php_sqlite3_db_object; - -/*typedef struct _php_sqlite3_stmt { - sqlite3_stmt *stmt; - int initialised; -} php_sqlite3_stmt;*/ - -typedef struct _php_sqlite3_stmt_object php_sqlite3_stmt; -typedef struct _php_sqlite3_result_object php_sqlite3_result; - -/* sqlite3 objects to be destroyed */ -typedef struct _php_sqlite3_stmt_free_list { - sqlite3_stmt *stmt; - - zval *statement_object; - zval *result_object; -} php_sqlite3_stmt_free_list; - -/* Structure for SQLite Result object. */ -struct _php_sqlite3_result_object { - zend_object zo; - php_sqlite3_db_object *db_obj; - php_sqlite3_stmt *stmt_obj; - zval *stmt_obj_zval; - - int initialised; - - int is_prepared_statement; - int complete; -}; - -/* Structure for SQLite Statement object. */ -struct _php_sqlite3_stmt_object { - zend_object zo; - sqlite3_stmt *stmt; - php_sqlite3_db_object *db_obj; - zval *db_obj_zval; - - int initialised; - - /* Keep track of the zvals for bound parameters */ - HashTable *bound_params; -}; - #endif /* http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite3/sqlite3.c?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/sqlite3/sqlite3.c diff -u php-src/ext/sqlite3/sqlite3.c:1.4 php-src/ext/sqlite3/sqlite3.c:1.5 --- php-src/ext/sqlite3/sqlite3.c:1.4 Sat Jul 26 22:58:45 2008 +++ php-src/ext/sqlite3/sqlite3.c Sat Jul 26 23:57:48 2008 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sqlite3.c,v 1.4 2008/07/26 22:58:45 jani Exp $ */ +/* $Id: sqlite3.c,v 1.5 2008/07/26 23:57:48 jani Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -27,6 +27,7 @@ #include "ext/standard/info.h" #include "ext/standard/file.h" #include "php_sqlite3.h" +#include "php_sqlite3_structs.h" #include <sqlite3.h> http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite3/php_sqlite3_structs.h?view=markup&rev=1.1 Index: php-src/ext/sqlite3/php_sqlite3_structs.h +++ php-src/ext/sqlite3/php_sqlite3_structs.h /* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2008 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Scott MacVicar <scottmac@php.net> | +----------------------------------------------------------------------+ */ /* $Id: php_sqlite3_structs.h,v 1.1 2008/07/26 23:57:48 jani Exp $ */ #ifndef PHP_SQLITE_STRUCTS_H #define PHP_SQLITE_STRUCTS_H #include <sqlite3.h> /* for backwards compatability reasons */ #ifndef SQLITE_OPEN_READONLY #define SQLITE_OPEN_READONLY 0x00000001 #endif #ifndef SQLITE_OPEN_READWRITE #define SQLITE_OPEN_READWRITE 0x00000002 #endif #ifndef SQLITE_OPEN_CREATE #define SQLITE_OPEN_CREATE 0x00000004 #endif /* Structure for SQLite Statement Parameter. */ struct php_sqlite3_bound_param { long param_number; char *name; int name_len; int type; zval *parameter; }; struct php_sqlite3_fci { zend_fcall_info fci; zend_fcall_info_cache fcc; }; /* Structure for SQLite function. */ typedef struct _php_sqlite3_func { struct _php_sqlite3_func *next; const char *func_name; int argc; zval *func, *step, *fini; struct php_sqlite3_fci afunc, astep, afini; } php_sqlite3_func; /* Structure for SQLite Database object. */ typedef struct _php_sqlite3_db_object { zend_object zo; int initialised; sqlite3 *db; php_sqlite3_func *funcs; } php_sqlite3_db_object; /*typedef struct _php_sqlite3_stmt { sqlite3_stmt *stmt; int initialised; } php_sqlite3_stmt;*/ typedef struct _php_sqlite3_stmt_object php_sqlite3_stmt; typedef struct _php_sqlite3_result_object php_sqlite3_result; /* sqlite3 objects to be destroyed */ typedef struct _php_sqlite3_stmt_free_list { sqlite3_stmt *stmt; zval *statement_object; zval *result_object; } php_sqlite3_stmt_free_list; /* Structure for SQLite Result object. */ struct _php_sqlite3_result_object { zend_object zo; php_sqlite3_db_object *db_obj; php_sqlite3_stmt *stmt_obj; zval *stmt_obj_zval; int initialised; int is_prepared_statement; int complete; }; /* Structure for SQLite Statement object. */ struct _php_sqlite3_stmt_object { zend_object zo; sqlite3_stmt *stmt; php_sqlite3_db_object *db_obj; zval *db_obj_zval; int initialised; /* Keep track of the zvals for bound parameters */ HashTable *bound_params; }; #endif /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */

« previous php.cvs (#51638) next »