Pack a signed pointer for a given target.

    Args:
        value(int): The value to pack.
        bits(:class:`pwnypack.target.Target.Bits`): Override the default
            word size. If ``None`` it will look at the word size of
            ``target``.
        endian(:class:`~pwnypack.target.Target.Endian`): Override the default
            byte order. If ``None``, it will look at the byte order of
            the ``target`` argument.
        target(:class:`~pwnypack.target.Target`): Override the default byte
            order. If ``None``, it will look at the byte order of
            the global :data:`~pwnypack.target.target`.

def p(value, bits=None, endian=None, target=None):
    """
    Pack a signed pointer for a given target.

    Args:
        value(int): The value to pack.
        bits(:class:`pwnypack.target.Target.Bits`): Override the default
            word size. If ``None`` it will look at the word size of
            ``target``.
        endian(:class:`~pwnypack.target.Target.Endian`): Override the default
            byte order. If ``None``, it will look at the byte order of
            the ``target`` argument.
        target(:class:`~pwnypack.target.Target`): Override the default byte
            order. If ``None``, it will look at the byte order of
            the global :data:`~pwnypack.target.target`.
    """

    return globals()['p%d' % _get_bits(bits, target)](value, endian=endian, target=target)