Annotation of embedaddon/php/ext/pdo_sqlite/php_pdo_sqlite_int.h, revision 1.1.1.1
1.1 misho 1: /*
2: +----------------------------------------------------------------------+
3: | PHP Version 5 |
4: +----------------------------------------------------------------------+
5: | Copyright (c) 1997-2012 The PHP Group |
6: +----------------------------------------------------------------------+
7: | This source file is subject to version 3.01 of the PHP license, |
8: | that is bundled with this package in the file LICENSE, and is |
9: | available through the world-wide-web at the following url: |
10: | http://www.php.net/license/3_01.txt |
11: | If you did not receive a copy of the PHP license and are unable to |
12: | obtain it through the world-wide-web, please send a note to |
13: | license@php.net so we can mail you a copy immediately. |
14: +----------------------------------------------------------------------+
15: | Author: Wez Furlong <wez@php.net> |
16: +----------------------------------------------------------------------+
17: */
18:
19: /* $Id: php_pdo_sqlite_int.h 321634 2012-01-01 13:15:04Z felipe $ */
20:
21: #ifndef PHP_PDO_SQLITE_INT_H
22: #define PHP_PDO_SQLITE_INT_H
23:
24: #include <sqlite3.h>
25:
26: typedef struct {
27: const char *file;
28: int line;
29: unsigned int errcode;
30: char *errmsg;
31: } pdo_sqlite_error_info;
32:
33: struct pdo_sqlite_fci {
34: zend_fcall_info fci;
35: zend_fcall_info_cache fcc;
36: };
37:
38: struct pdo_sqlite_func {
39: struct pdo_sqlite_func *next;
40:
41: zval *func, *step, *fini;
42: int argc;
43: const char *funcname;
44:
45: /* accelerated callback references */
46: struct pdo_sqlite_fci afunc, astep, afini;
47: };
48:
49: typedef struct {
50: sqlite3 *db;
51: pdo_sqlite_error_info einfo;
52: struct pdo_sqlite_func *funcs;
53: } pdo_sqlite_db_handle;
54:
55: typedef struct {
56: pdo_sqlite_db_handle *H;
57: sqlite3_stmt *stmt;
58: unsigned pre_fetched:1;
59: unsigned done:1;
60: } pdo_sqlite_stmt;
61:
62: extern pdo_driver_t pdo_sqlite_driver;
63:
64: extern int _pdo_sqlite_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int line TSRMLS_DC);
65: #define pdo_sqlite_error(s) _pdo_sqlite_error(s, NULL, __FILE__, __LINE__ TSRMLS_CC)
66: #define pdo_sqlite_error_stmt(s) _pdo_sqlite_error(stmt->dbh, stmt, __FILE__, __LINE__ TSRMLS_CC)
67:
68: extern struct pdo_stmt_methods sqlite_stmt_methods;
69: #endif
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>