Message102203
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. |
|
Date |
User |
Action |
Args |
2010-04-02 21:06:17 | larry | set | recipients:
+ larry, lemburg, jcea, pitrou, vstinner, benjamin.peterson, brian.curtin, flox |
2010-04-02 21:06:17 | larry | set | messageid: <1270242377.79.0.346700559997.issue7992@psf.upfronthosting.co.za> |
2010-04-02 21:06:16 | larry | link | issue7992 messages |
2010-04-02 21:06:16 | larry | create | |
|