'Return the address of a <cdata \'struct-or-union\'>.
If \'fields_or_indexes\' are given, returns the address of that
field or array item in the structure or array, recursively in
case of nested structures.'

def addressof(self, cdata, *fields_or_indexes):

    ctype = self._backend.typeof(cdata)
    if fields_or_indexes:
        (ctype, offset) = self._typeoffsetof(ctype, *fields_or_indexes)
    else:
        if (ctype.kind == 'pointer'):
            raise TypeError('addressof(pointer)')
        offset = 0
    ctypeptr = self._pointer_to(ctype)
    return self._backend.rawaddressof(ctypeptr, cdata, offset)
