def mapfmt(fmt: bytes, size: int) -> bytes:
    """
    Changes the type of of a format string from 32-bit to 64-bit.

    WARNING: doesn't handle strings.

    Example
    -------
    >>> mapfmt(b'2i 6f')
    b'2q 6d'
    """
    if size == 4:
        return fmt
    return fmt.replace(b'i', b'q').replace(b'f', b'd')