Changeset 132 for python/trunk/Modules/bsddb.h
- Timestamp:
- Jan 4, 2011, 10:35:57 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk/Modules/bsddb.h
r2 r132 71 71 * DBSequence (Sequence) 72 72 * 73 * New datatypes: 74 * 75 * DBLogCursor (Log Cursor) 76 * 73 77 */ 74 78 … … 106 110 #endif 107 111 108 #define PY_BSDDB_VERSION "4. 7.3"112 #define PY_BSDDB_VERSION "4.8.4" 109 113 110 114 /* Python object definitions */ … … 123 127 struct DBObject; /* Forward declaration */ 124 128 struct DBCursorObject; /* Forward declaration */ 129 struct DBLogCursorObject; /* Forward declaration */ 125 130 struct DBTxnObject; /* Forward declaration */ 126 131 struct DBSequenceObject; /* Forward declaration */ … … 135 140 struct DBObject *children_dbs; 136 141 struct DBTxnObject *children_txns; 142 struct DBLogCursorObject *children_logcursors; 137 143 PyObject *private_obj; 138 144 PyObject *rep_transport; … … 146 152 u_int32_t flags; /* saved flags from open() */ 147 153 u_int32_t setflags; /* saved flags from set_flags() */ 148 int haveStat;149 154 struct behaviourFlags moduleFlags; 150 155 struct DBTxnObject *txn; … … 194 199 195 200 201 typedef struct DBLogCursorObject { 202 PyObject_HEAD 203 DB_LOGC* logc; 204 DBEnvObject* env; 205 struct DBLogCursorObject **sibling_prev_p; 206 struct DBLogCursorObject *sibling_next; 207 PyObject *in_weakreflist; /* List of weak references */ 208 } DBLogCursorObject; 209 210 196 211 typedef struct { 197 212 PyObject_HEAD 198 213 DB_LOCK lock; 214 int lock_initialized; /* Signal if we actually have a lock */ 199 215 PyObject *in_weakreflist; /* List of weak references */ 200 216 } DBLockObject; … … 221 237 following (error checking missed out for clarity): 222 238 239 // If you are using Python before 3.2: 223 240 BSDDB_api* bsddb_api; 224 241 PyObject* mod; … … 232 249 Py_DECREF(mod); 233 250 251 252 // If you are using Python 3.2 or up: 253 BSDDB_api* bsddb_api; 254 255 // Use "bsddb3._pybsddb.api" if you're using 256 // the standalone pybsddb add-on. 257 bsddb_api = (void **)PyCapsule_Import("bsddb._bsddb.api", 1); 258 259 234 260 The structure's members must not be changed. 235 261 */ … … 239 265 PyTypeObject* db_type; 240 266 PyTypeObject* dbcursor_type; 267 PyTypeObject* dblogcursor_type; 241 268 PyTypeObject* dbenv_type; 242 269 PyTypeObject* dbtxn_type; … … 248 275 /* Functions */ 249 276 int (*makeDBError)(int err); 250 251 277 } BSDDB_api; 252 278
Note:
See TracChangeset
for help on using the changeset viewer.