Larry Hastings <la...@hastings.org> added the comment:

The patch is a bit more involved than that.  Capsules didn't exist in 3.0, and 
the bsddb module published a CObject in 3.1.  So bsddb must continue to use 
CObject for those two releases.

Therefore the patch to the line you were addressing looks like this:

-#if (PY_VERSION_HEX < 0x03020000)
+#if (PY_VERSION_HEX < ((PY_MAJOR_VERSION < 3) ? 0x02070000 : 0x03020000))

However, Jesus's use of capsules has a bug.  The capsule API requires that the 
string passed in to PyCapsule_New() must "outlive" the capsule; he's passing in 
a stack buffer.  So my patch also fixes that.

Finally my bsddb patch adds the appropriate text to the header file where it 
describes how to import the _bsddb C API object (CObject vs capsule).

FWIW, I want to close this issue soon.  How about I close it after 2.7b1 has 
been out for a week or so--assuming there aren't any new concerns regarding the 
capsule backport.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7992>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to