(cls, receiver, selector, *args, restype=c_void_p, argtypes=None, _allow_dealloc=False)
return result
In the context of the given class, call a superclass method on the receiver
    with the given selector and arguments.

    This is the equivalent of an Objective-C method call like ``[super sel:args]`` in the class ``cls``.

    In practice, the first parameter should always be the special variable ``__class__``,
    and the second parameter should be ``self``.
    A typical :func:`send_super` call would be ``send_super(__class__, self, 'init')`` for example.

    The special variable ``__class__`` is defined by Python and stands for the class object that is being created
    by the current ``class`` block. The exact reasons why ``__class__`` must be passed manually are somewhat technical,
    and are not directly relevant to users of :func:`send_super`. For a full explanation,
    see issue `pybee/rubicon-objc#107 <https://github.com/pybee/rubicon-objc/issues/107>`__
    and PR `pybee/rubicon-objc#108 <https://github.com/pybee/rubicon-objc/pull/108>`__.

    Although it is possible to pass other values than ``__class__`` and ``self`` for the first two parameters,
    this is strongly discouraged. Doing so is not supported by the Objective-C language,
    and relies on implementation details of the superclasses.

    :param cls: The class in whose context the ``super`` call is happening, as an :class:`ObjCClass` or :class:`Class`.
    :param receiver: The object on which to call the method, as an :class:`ObjCInstance`, :class:`objc_id`,
        or :class:`~ctypes.c_void_p`.
    :param selector: The name of the method as a :class:`str`, :class:`bytes`, or :class:`SEL`.
    :param args: The method arguments.
    :param restype: The return type of the method. Defaults to :class:`~ctypes.c_void_p`.
    :param argtypes: The argument types of the method, as a :class:`list`. Defaults to an empty list
        (i. e. all arguments are treated as C varargs).
In the context of the given class, call a superclass method on the receiver
    with the given selector and arguments.
In the context of the given class call a superclass method on the receiver with the given selector and arguments .
def send_super(cls, receiver, selector, *args, restype=c_void_p, argtypes=None, _allow_dealloc=False):
    """In the context of the given class, call a superclass method on the receiver
    with the given selector and arguments.

    This is the equivalent of an Objective-C method call like ``[super sel:args]`` in the class ``cls``.

    In practice, the first parameter should always be the special variable ``__class__``,
    and the second parameter should be ``self``.
    A typical :func:`send_super` call would be ``send_super(__class__, self, 'init')`` for example.

    The special variable ``__class__`` is defined by Python and stands for the class object that is being created
    by the current ``class`` block. The exact reasons why ``__class__`` must be passed manually are somewhat technical,
    and are not directly relevant to users of :func:`send_super`. For a full explanation,
    see issue `pybee/rubicon-objc#107 <https://github.com/pybee/rubicon-objc/issues/107>`__
    and PR `pybee/rubicon-objc#108 <https://github.com/pybee/rubicon-objc/pull/108>`__.

    Although it is possible to pass other values than ``__class__`` and ``self`` for the first two parameters,
    this is strongly discouraged. Doing so is not supported by the Objective-C language,
    and relies on implementation details of the superclasses.

    :param cls: The class in whose context the ``super`` call is happening, as an :class:`ObjCClass` or :class:`Class`.
    :param receiver: The object on which to call the method, as an :class:`ObjCInstance`, :class:`objc_id`,
        or :class:`~ctypes.c_void_p`.
    :param selector: The name of the method as a :class:`str`, :class:`bytes`, or :class:`SEL`.
    :param args: The method arguments.
    :param restype: The return type of the method. Defaults to :class:`~ctypes.c_void_p`.
    :param argtypes: The argument types of the method, as a :class:`list`. Defaults to an empty list
        (i. e. all arguments are treated as C varargs).
    """

    # Unwrap ObjCClass to Class if necessary
    try:
        cls = cls._as_parameter_
    except AttributeError:
        pass

    # Convert str / bytes to selector
    selector = SEL(selector)

    if not isinstance(cls, Class):
        # Kindly remind the caller that the API has changed
        raise TypeError(
            'Missing or invalid cls argument: expected an ObjCClass or Class, not {tp.__module__}.{tp.__qualname__}\n'
            'send_super requires the current class to be passed explicitly as the first argument. '
            'To fix this error, pass the special name __class__ as the first argument to send_super.'
            .format(tp=type(cls))
        )

    if not _allow_dealloc and selector.name == b"dealloc":
        warnings.warn(
            "You should not call the superclass dealloc manually when overriding dealloc. Rubicon-objc "
            "will call it for you after releasing objects stored in properties and ivars.",
            stacklevel=2
        )
        return

    try:
        receiver = receiver._as_parameter_
    except AttributeError:
        pass

    if isinstance(receiver, objc_id):
        pass
    elif type(receiver) == c_void_p:
        receiver = cast(receiver, objc_id)
    else:
        raise TypeError("Invalid type for receiver: {tp.__module__}.{tp.__qualname__}".format(tp=type(receiver)))

    super_ptr = libobjc.class_getSuperclass(cls)
    if super_ptr.value is None:
        raise ValueError(
            'The specified class {!r} is a root class, it cannot be used with send_super'
            .format(libobjc.class_getName(cls).decode('utf-8'))
        )
    super_struct = objc_super(receiver, super_ptr)
    if argtypes is None:
        argtypes = []

    if should_use_stret(restype):
        send = libobjc['objc_msgSendSuper_stret']
    else:
        send = libobjc['objc_msgSendSuper']
    send.restype = restype
    send.argtypes = [POINTER(objc_super), SEL] + argtypes
    result = send(byref(super_struct), selector, *args)
    if restype == c_void_p:
        result = c_void_p(result)
    return result
def send_super ( cls , receiver , selector , * args , restype = c_void_p , argtypes = None , _allow_dealloc = False ) : # Unwrap ObjCClass to Class if necessary try : cls = cls . _as_parameter_ except AttributeError : pass # Convert str / bytes to selector selector = SEL ( selector ) if not isinstance ( cls , Class ) : # Kindly remind the caller that the API has changed raise TypeError ( 'Missing or invalid cls argument: expected an ObjCClass or Class, not {tp.__module__}.{tp.__qualname__}\n' 'send_super requires the current class to be passed explicitly as the first argument. ' 'To fix this error, pass the special name __class__ as the first argument to send_super.' . format ( tp = type ( cls ) ) ) if not _allow_dealloc and selector . name == b"dealloc" : warnings . warn ( "You should not call the superclass dealloc manually when overriding dealloc. Rubicon-objc " "will call it for you after releasing objects stored in properties and ivars." , stacklevel = 2 ) return try : receiver = receiver . _as_parameter_ except AttributeError : pass if isinstance ( receiver , objc_id ) : pass elif type ( receiver ) == c_void_p : receiver = cast ( receiver , objc_id ) else : raise TypeError ( "Invalid type for receiver: {tp.__module__}.{tp.__qualname__}" . format ( tp = type ( receiver ) ) ) super_ptr = libobjc . class_getSuperclass ( cls ) if super_ptr . value is None : raise ValueError ( 'The specified class {!r} is a root class, it cannot be used with send_super' . format ( libobjc . class_getName ( cls ) . decode ( 'utf-8' ) ) ) super_struct = objc_super ( receiver , super_ptr ) if argtypes is None : argtypes = [ ] if should_use_stret ( restype ) : send = libobjc [ 'objc_msgSendSuper_stret' ] else : send = libobjc [ 'objc_msgSendSuper' ] send . restype = restype send . argtypes = [ POINTER ( objc_super ) , SEL ] + argtypes result = send ( byref ( super_struct ) , selector , * args ) if restype == c_void_p : result = c_void_p ( result ) return result