New submission from Petr Viktorin: In https://docs.python.org/3/howto/cporting.html#cobject-replaced-with-capsule (added in issue13053):
1) __PyCapsule_GetField is defined as:: #define __PyCapsule_GetField(capsule, field, default_value) ... but called as:: __PyCapsule_GetField(capsule, field) 2) __PyCapsule_SetField returns the wrong value (1 for success, 0 for failure). 3) Both the getter and setter don't set the exception on failure, leading to "SystemError: error return without exception set". Here's a patch. ---------- assignee: docs@python components: Documentation files: capsulethunk.patch keywords: patch messages: 249138 nosy: docs@python, encukou, larry, ncoghlan priority: normal severity: normal status: open title: Multiple problems in getters & setters in capsulethunk.h versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file40256/capsulethunk.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24937> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com