diff options
| author | Gerhard Häring <gh@ghaering.de> | 2007-01-14 01:43:50 (GMT) |
|---|---|---|
| committer | Gerhard Häring <gh@ghaering.de> | 2007-01-14 01:43:50 (GMT) |
| commit | 0741a60ca7b332b755d8a6b3328da414f963f7b4 (patch) | |
| tree | 470ec59548f5d0a1a875183c9edeedf8bd97454d /Modules/_sqlite/cursor.h | |
| parent | b1a8ef629753ddfd23968a4418669ebbda83c835 (diff) | |
| download | cpython-0741a60ca7b332b755d8a6b3328da414f963f7b4.zip cpython-0741a60ca7b332b755d8a6b3328da414f963f7b4.tar.gz cpython-0741a60ca7b332b755d8a6b3328da414f963f7b4.tar.bz2 | |
Merged changes from standalone version 2.3.3. This should probably all be
merged into the 2.5 maintenance branch:
- self->statement was not checked while fetching data, which could
lead to crashes if you used the pysqlite API in unusual ways.
Closing the cursor and continuing to fetch data was enough.
- Converters are stored in a converters dictionary. The converter name
is uppercased first. The old upper-casing algorithm was wrong and
was replaced by a simple call to the Python string's upper() method
instead.
-Applied patch by Glyph Lefkowitz that fixes the problem with
subsequent SQLITE_SCHEMA errors.
- Improvement to the row type: rows can now be iterated over and have a keys()
method. This improves compatibility with both tuple and dict a lot.
- A bugfix for the subsecond resolution in timestamps.
- Corrected the way the flags PARSE_DECLTYPES and PARSE_COLNAMES are
checked for. Now they work as documented.
- gcc on Linux sucks. It exports all symbols by default in shared
libraries, so if symbols are not unique it can lead to problems with
symbol lookup. pysqlite used to crash under Apache when mod_cache
was enabled because both modules had the symbol cache_init. I fixed
this by applying the prefix pysqlite_ almost everywhere. Sigh.
Diffstat (limited to 'Modules/_sqlite/cursor.h')
| -rw-r--r-- | Modules/_sqlite/cursor.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/Modules/_sqlite/cursor.h b/Modules/_sqlite/cursor.h index 831ff81..5fce64a 100644 --- a/Modules/_sqlite/cursor.h +++ b/Modules/_sqlite/cursor.h @@ -32,40 +32,40 @@ typedef struct { PyObject_HEAD - Connection* connection; + pysqlite_Connection* connection; PyObject* description; PyObject* row_cast_map; int arraysize; PyObject* lastrowid; PyObject* rowcount; PyObject* row_factory; - Statement* statement; + pysqlite_Statement* statement; /* the next row to be returned, NULL if no next row available */ PyObject* next_row; -} Cursor; +} pysqlite_Cursor; typedef enum { STATEMENT_INVALID, STATEMENT_INSERT, STATEMENT_DELETE, STATEMENT_UPDATE, STATEMENT_REPLACE, STATEMENT_SELECT, STATEMENT_OTHER -} StatementKind; +} pysqlite_StatementKind; -extern PyTypeObject CursorType; +extern PyTypeObject pysqlite_CursorType; -int cursor_init(Cursor* self, PyObject* args, PyObject* kwargs); -void cursor_dealloc(Cursor* self); -PyObject* cursor_execute(Cursor* self, PyObject* args); -PyObject* cursor_executemany(Cursor* self, PyObject* args); -PyObject* cursor_getiter(Cursor *self); -PyObject* cursor_iternext(Cursor *self); -PyObject* cursor_fetchone(Cursor* self, PyObject* args); -PyObject* cursor_fetchmany(Cursor* self, PyObject* args); -PyObject* cursor_fetchall(Cursor* self, PyObject* args); -PyObject* pysqlite_noop(Connection* self, PyObject* args); -PyObject* cursor_close(Cursor* self, PyObject* args); +int pysqlite_cursor_init(pysqlite_Cursor* self, PyObject* args, PyObject* kwargs); +void pysqlite_cursor_dealloc(pysqlite_Cursor* self); +PyObject* pysqlite_cursor_execute(pysqlite_Cursor* self, PyObject* args); +PyObject* pysqlite_cursor_executemany(pysqlite_Cursor* self, PyObject* args); +PyObject* pysqlite_cursor_getiter(pysqlite_Cursor *self); +PyObject* pysqlite_cursor_iternext(pysqlite_Cursor *self); +PyObject* pysqlite_cursor_fetchone(pysqlite_Cursor* self, PyObject* args); +PyObject* pysqlite_cursor_fetchmany(pysqlite_Cursor* self, PyObject* args); +PyObject* pysqlite_cursor_fetchall(pysqlite_Cursor* self, PyObject* args); +PyObject* pysqlite_noop(pysqlite_Connection* self, PyObject* args); +PyObject* pysqlite_cursor_close(pysqlite_Cursor* self, PyObject* args); -int cursor_setup_types(void); +int pysqlite_cursor_setup_types(void); #define UNKNOWN (-1) #endif |
