Returns the object contained in a Python wrapped type.
If the passed D reference has an existing Python object, return a borrowed reference to it. Otherwise, return null.
Returns a new Python object of a wrapped type.
_
A useful check for whether a given class has been wrapped. Mainly used by the conversion functions (see make_object.d), but possibly useful elsewhere.
A bidirectional mapping of a pyobject and the d object associated to it. On the python side, these are weak references; we don't want to prevent python from reclaiming objects it is finished with. As such, on the D side, if you take PyObject*s out of here and store them for an extended time elsewhere, be sure to increment the reference count. On the D side, we have strong references, but that is incidental to the GC. If you stick d objects not allocated with the GC, there will probably be leaks. We use malloc for the container's structure because we can't use the GC inside a destructor and we need to use this container there.