Source

pypy / pypy / module / cpyext / pypyintf.py

Hakan Ardo 2447f54 







1
2
3
4
5
6
7
8
9
from pypy.module.cpyext.api import cpython_api
from pypy.module.cpyext.pyobject import PyObject, borrow_from


@cpython_api([PyObject, PyObject], PyObject)
def PyPy_Borrow(space, w_parentobj, w_obj):
    """Returns a borrowed reference to 'obj', borrowing from the 'parentobj'.
    """
    return borrow_from(w_parentobj, w_obj)