[Patches] [ python-Patches-1071911 ] Add support for db 4.3

SourceForge.net noreply at sourceforge.net
Mon Dec 6 12:09:28 CET 2004


Patches item #1071911, was opened at 2004-11-23 18:11
Message generated for change (Comment added) made by nijel
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1071911&group_id=5470

Category: Modules
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Michal Čihař (nijel)
Assigned to: Nobody/Anonymous (nobody)
Summary: Add support for db 4.3

Initial Comment:
Hi, attached patch adds support for db 4.3. It doens't
cover almost no new constants (only one that was at
least in 4.2), but just allows compiling.

----------------------------------------------------------------------

>Comment By: Michal Čihař (nijel)
Date: 2004-12-06 12:09

Message:
Logged In: YES 
user_id=192186

Yes, you're right I missed that (or better to say: I looked
just at compile time errors). Updated patch with included
your hunk.

----------------------------------------------------------------------

Comment By: SUZUKI Hisao (suzuki_hisao)
Date: 2004-12-04 11:14

Message:
Logged In: YES 
user_id=495142

Your patch works well, except for "has_key()".
It results False always.
This is because an API of DB has changed slightly:
DB->get() returns DB_BUFFER_SMALL instead of ENOMEM now.
For Modules/_bsddb.c, we need:

@@ -2536,7 +2552,11 @@
     err = self->db->get(self->db, txn, &key, &data, 0);
     MYDB_END_ALLOW_THREADS;
     FREE_DBT(key);
+#if (DBVER >= 43)
+    return PyInt_FromLong((err == DB_BUFFER_SMALL) || (err
== 0));
+#else
     return PyInt_FromLong((err == ENOMEM) || (err == 0));
+#endif
 }


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1071911&group_id=5470


More information about the Patches mailing list