pybsddb with cffi

Check-in [49c72dfaa2]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Raise TypeError as in original
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:49c72dfaa2f01a0405c31838da4d1b2d9d76ebb0
User & Date: broker-3 2013-03-01 17:20:10
Context
2013-05-11
15:59
Show db verion in report check-in: 9249afb249 user: Senyai tags: trunk
2013-03-01
17:20
Raise TypeError as in original check-in: 49c72dfaa2 user: broker-3 tags: trunk
10:49
Minimal setup.py - testing check-in: 45d702784c user: broker-3 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to bsddb3/db.py.

168
169
170
171
172
173
174
175
176
177
178
179
180
181
182

        a = ffi.new("int *", keyobj)  # warning. this is actually db_recno_t
        key.data = a
        key.flags = DB_DBT_REALLOC
        key.ulen = key.size = ffi.sizeof(a)
        weakkeydict[key] = a
    else:
        raise Exception('No support for %r type yet' % (type(keyobj),))
    return key, flags


def _make_dbt(dataobj):
    data = ffi.new("DBT *")
    if dataobj:
        assert isinstance(dataobj, str), dataobj







|







168
169
170
171
172
173
174
175
176
177
178
179
180
181
182

        a = ffi.new("int *", keyobj)  # warning. this is actually db_recno_t
        key.data = a
        key.flags = DB_DBT_REALLOC
        key.ulen = key.size = ffi.sizeof(a)
        weakkeydict[key] = a
    else:
        raise TypeError('String or Integer object expected for key, %s found' % type(keyobj))
    return key, flags


def _make_dbt(dataobj):
    data = ffi.new("DBT *")
    if dataobj:
        assert isinstance(dataobj, str), dataobj