Closed behackett closed 5 years ago
It would appear we can't add names to the capsules, since that forces PyCapsule_GetPointer calls to pass the correct name. That won't work for mech oids, since there are two now and could conceivably be more later. This won't keep us from switching to PyCapsule for 2.7 (which will eliminate some confusing aliases), but defeats one of the reasons to do it.
https://github.com/python/cpython/blame/v3.7.2/Objects/capsule.c#L32
Actually, we can just pass the value of PyCapsule_GetName in the mechoid case.
https://docs.python.org/2/c-api/capsule.html#c.PyCapsule_GetName
Now that we've dropped Python 2.6, let's switch 2.7 over to PyCapsule. That way we can name the objects which should make development and debugging easier for users.